import{d as I,$ as L,an as M,L as U,cU as $,ab as K,N as S,f as u,U as m,b7 as z,Q as c,aV as N,cV as V,cW as W,x as X,a5 as f,a2 as b,bU as _,cX as H,a_ as Q,E as Y,o as q,aC as E}from"./outputWidgets.e822ff0f.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="166809f0-8f7d-4af4-90a2-7a592959097b",e._sentryDebugIdIdentifier="sentry-dbid-166809f0-8f7d-4af4-90a2-7a592959097b")}catch{}})();var G=globalThis&&globalThis.__rest||function(e,s){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&s.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)s.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t};let P;const J=e=>{P={x:e.pageX,y:e.pageY},setTimeout(()=>P=null,100)};W()&&X(document.documentElement,"click",J,!0);const Z=()=>({prefixCls:String,visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},confirmLoading:{type:Boolean,default:void 0},title:f.any,closable:{type:Boolean,default:void 0},closeIcon:f.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:f.any,okText:f.any,okType:String,cancelText:f.any,icon:f.any,maskClosable:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},okButtonProps:b(),cancelButtonProps:b(),destroyOnClose:{type:Boolean,default:void 0},wrapClassName:String,maskTransitionName:String,transitionName:String,getContainer:{type:[String,Function,Boolean,Object],default:void 0},zIndex:Number,bodyStyle:b(),maskStyle:b(),mask:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},wrapProps:Object,focusTriggerAfterClose:{type:Boolean,default:void 0},modalRender:Function,mousePosition:b()}),ae=I({compatConfig:{MODE:3},name:"AModal",inheritAttrs:!1,props:L(Z(),{width:520,confirmLoading:!1,okType:"primary"}),setup(e,s){let{emit:t,slots:n,attrs:o}=s;const[g]=M("Modal"),{prefixCls:i,rootPrefixCls:v,direction:T,getPopupContainer:p}=U("modal",e),[C,k]=$(i);K(e.visible===void 0);const a=l=>{t("update:visible",!1),t("update:open",!1),t("cancel",l),t("change",!1)},d=l=>{t("ok",l)},x=()=>{var l,r;const{okText:B=(l=n.okText)===null||l===void 0?void 0:l.call(n),okType:O,cancelText:y=(r=n.cancelText)===null||r===void 0?void 0:r.call(n),confirmLoading:w}=e;return u(Q,null,[u(_,c({onClick:a},e.cancelButtonProps),{default:()=>[y||g.value.cancelText]}),u(_,c(c({},H(O)),{},{loading:w,onClick:d},e.okButtonProps),{default:()=>[B||g.value.okText]})])};return()=>{var l,r;const{prefixCls:B,visible:O,open:y,wrapClassName:w,centered:j,getContainer:D,closeIcon:F=(l=n.closeIcon)===null||l===void 0?void 0:l.call(n),focusTriggerAfterClose:R=!0}=e,h=G(e,["prefixCls","visible","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose"]),A=S(w,{[`${i.value}-centered`]:!!j,[`${i.value}-wrap-rtl`]:T.value==="rtl"});return C(u(V,c(c(c({},h),o),{},{rootClassName:k.value,class:S(k.value,o.class),getContainer:D||(p==null?void 0:p.value),prefixCls:i.value,wrapClassName:A,visible:y!=null?y:O,onClose:a,focusTriggerAfterClose:R,transitionName:N(v.value,"zoom",e.transitionName),maskTransitionName:N(v.value,"fade",e.maskTransitionName),mousePosition:(r=h.mousePosition)!==null&&r!==void 0?r:P}),m(m({},n),{footer:n.footer||x,closeIcon:()=>u("span",{class:`${i.value}-close-x`},[F||u(z,{class:`${i.value}-close-icon`},null)])})))}}});var ee=globalThis&&globalThis.__rest||function(e,s){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&s.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)s.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t};const ne={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},oe=I({compatConfig:{MODE:3},name:"TransButton",inheritAttrs:!1,props:{noStyle:{type:Boolean,default:void 0},onClick:Function,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0}},setup(e,s){let{slots:t,emit:n,attrs:o,expose:g}=s;const i=Y(),v=a=>{const{keyCode:d}=a;d===E.ENTER&&a.preventDefault()},T=a=>{const{keyCode:d}=a;d===E.ENTER&&n("click",a)},p=a=>{n("click",a)},C=()=>{i.value&&i.value.focus()},k=()=>{i.value&&i.value.blur()};return q(()=>{e.autofocus&&C()}),g({focus:C,blur:k}),()=>{var a;const{noStyle:d,disabled:x}=e,l=ee(e,["noStyle","disabled"]);let r={};return d||(r=m({},ne)),x&&(r.pointerEvents="none"),u("div",c(c(c({role:"button",tabindex:0,ref:i},l),o),{},{onClick:p,onKeydown:v,onKeyup:T,style:m(m({},r),o.style||{})}),[(a=t.default)===null||a===void 0?void 0:a.call(t)])}}}),le=oe;export{ae as M,le as T};
//# sourceMappingURL=transButton.f06af665.js.map
