import{d as L,Y as A,al as M,K as R,cP as $,a9 as z,L as P,f as r,Q as w,bs as U,O as c,aT as B,cQ as Q,cR as W,v as Y,a3 as d,a0 as f,bM as N,cS as K,bo as V}from"./outputWidgets.b703ca45.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]="e9281a64-eb49-4fff-92e6-4b31e3da25cc",e._sentryDebugIdIdentifier="sentry-dbid-e9281a64-eb49-4fff-92e6-4b31e3da25cc")}catch{}})();var X=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)};W()&&Y(document.documentElement,"click",q,!0);const G=()=>({prefixCls:String,visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},confirmLoading:{type:Boolean,default:void 0},title:d.any,closable:{type:Boolean,default:void 0},closeIcon:d.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:d.any,okText:d.any,okType:String,cancelText:d.any,icon:d.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()}),J=L({compatConfig:{MODE:3},name:"AModal",inheritAttrs:!1,props:A(G(),{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]=$(i);z(e.visible===void 0);const T=o=>{a("update:visible",!1),a("update:open",!1),a("cancel",o),a("change",!1)},h=o=>{a("ok",o)},I=()=>{var o,s;const{okText:k=(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(V,null,[r(N,c({onClick:T},e.cancelButtonProps),{default:()=>[u||b.value.cancelText]}),r(N,c(c({},K(m)),{},{loading:y,onClick:h},e.okButtonProps),{default:()=>[k||b.value.okText]})])};return()=>{var o,s;const{prefixCls:k,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=X(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(Q,c(c(c({},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:T,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||I,closeIcon:()=>r("span",{class:`${i.value}-close-x`},[j||r(U,{class:`${i.value}-close-icon`},null)])})))}}});export{J as M};
//# sourceMappingURL=Modal.c03e4b0a.js.map
