import{d as A,a3 as L,ar as M,S as R,cV as U,af as W,U as P,f as r,Y as w,aP as $,W as d,cW as B,cX as z,cY as Y,G,a9 as c,a6 as f,bI as N,cZ as V,aG as X}from"./outputWidgets.52571dac.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},l=new Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="fa78ed7e-d001-46d9-b0d2-cdea0bcbb9c0",e._sentryDebugIdIdentifier="sentry-dbid-fa78ed7e-d001-46d9-b0d2-cdea0bcbb9c0")}catch{}})();var Z=globalThis&&globalThis.__rest||function(e,l){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&l.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t=0,n=Object.getOwnPropertySymbols(e);t<n.length;t++)l.indexOf(n[t])<0&&Object.prototype.propertyIsEnumerable.call(e,n[t])&&(a[n[t]]=e[n[t]]);return a};let g;const q=e=>{g={x:e.pageX,y:e.pageY},setTimeout(()=>g=null,100)};Y()&&G(document.documentElement,"click",q,!0);const H=()=>({prefixCls:String,visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},confirmLoading:{type:Boolean,default:void 0},title:c.any,closable:{type:Boolean,default:void 0},closeIcon:c.any,onOk:Function,onCancel:Function,"onUpdate:visible":Function,"onUpdate:open":Function,onChange:Function,afterClose:Function,centered:{type:Boolean,default:void 0},width:[String,Number],footer:c.any,okText:c.any,okType:String,cancelText:c.any,icon:c.any,maskClosable:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},okButtonProps:f(),cancelButtonProps:f(),destroyOnClose:{type:Boolean,default:void 0},wrapClassName:String,maskTransitionName:String,transitionName:String,getContainer:{type:[String,Function,Boolean,Object],default:void 0},zIndex:Number,bodyStyle:f(),maskStyle:f(),mask:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},wrapProps:Object,focusTriggerAfterClose:{type:Boolean,default:void 0},modalRender:Function,mousePosition:f()}),K=A({compatConfig:{MODE:3},name:"AModal",inheritAttrs:!1,props:L(H(),{width:520,confirmLoading:!1,okType:"primary"}),setup(e,l){let{emit:a,slots:n,attrs:t}=l;const[b]=M("Modal"),{prefixCls:i,rootPrefixCls:v,direction:O,getPopupContainer:p}=R("modal",e),[S,C]=U(i);W(e.visible===void 0);const k=o=>{a("update:visible",!1),a("update:open",!1),a("cancel",o),a("change",!1)},I=o=>{a("ok",o)},h=()=>{var o,s;const{okText:T=(o=n.okText)===null||o===void 0?void 0:o.call(n),okType:m,cancelText:u=(s=n.cancelText)===null||s===void 0?void 0:s.call(n),confirmLoading:y}=e;return r(X,null,[r(N,d({onClick:k},e.cancelButtonProps),{default:()=>[u||b.value.cancelText]}),r(N,d(d({},V(m)),{},{loading:y,onClick:I},e.okButtonProps),{default:()=>[T||b.value.okText]})])};return()=>{var o,s;const{prefixCls:T,visible:m,open:u,wrapClassName:y,centered:_,getContainer:F,closeIcon:j=(o=n.closeIcon)===null||o===void 0?void 0:o.call(n),focusTriggerAfterClose:D=!0}=e,x=Z(e,["prefixCls","visible","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose"]),E=P(y,{[`${i.value}-centered`]:!!_,[`${i.value}-wrap-rtl`]:O.value==="rtl"});return S(r(z,d(d(d({},x),t),{},{rootClassName:C.value,class:P(C.value,t.class),getContainer:F||(p==null?void 0:p.value),prefixCls:i.value,wrapClassName:E,visible:u!=null?u:m,onClose:k,focusTriggerAfterClose:D,transitionName:B(v.value,"zoom",e.transitionName),maskTransitionName:B(v.value,"fade",e.maskTransitionName),mousePosition:(s=x.mousePosition)!==null&&s!==void 0?s:g}),w(w({},n),{footer:n.footer||h,closeIcon:()=>r("span",{class:`${i.value}-close-x`},[j||r($,{class:`${i.value}-close-icon`},null)])})))}}});export{K as M};
//# sourceMappingURL=Modal.514213ca.js.map
