import{d as A,a1 as L,ap as M,Q as R,cT as U,ad as W,R as P,f as r,W as w,aN as $,U as d,cU as B,cV as z,cW as V,B as X,a7 as c,a4 as f,bG as N,cX as G,aE as Q}from"./outputWidgets.f4ff73cb.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]="0a431358-375d-4e59-90aa-659935a3f99b",e._sentryDebugIdIdentifier="sentry-dbid-0a431358-375d-4e59-90aa-659935a3f99b")}catch{}})();var Y=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)};V()&&X(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[v]=M("Modal"),{prefixCls:i,rootPrefixCls:b,direction:O,getPopupContainer:p}=R("modal",e),[S,C]=U(i);W(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(Q,null,[r(N,d({onClick:T},e.cancelButtonProps),{default:()=>[u||v.value.cancelText]}),r(N,d(d({},G(m)),{},{loading:y,onClick:h},e.okButtonProps),{default:()=>[k||v.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=Y(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:T,focusTriggerAfterClose:D,transitionName:B(b.value,"zoom",e.transitionName),maskTransitionName:B(b.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($,{class:`${i.value}-close-icon`},null)])})))}}});export{K as M};
//# sourceMappingURL=Modal.fb9d97fb.js.map
