"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("element-plus"),m=Symbol("ModalStateToken"),c=Symbol("ModalIdToken"),v=()=>e.inject(m,{}),y=()=>e.inject(c,"");function B(){const{store:i,action:n,modalPromise:r}=v(),o=y(),u=i[o],s=d=>n==null?void 0:n.show(o,d),a=()=>n==null?void 0:n.hide(o),l=()=>n==null?void 0:n.remove(o),t=d=>r[o].resolve(d),p=d=>r[o].reject(d);return{show:s,hide:a,visible:e.toRef(u,"visible"),args:e.toRef(u,"args"),remove:l,resolve:t,reject:p}}const C=e.defineComponent({name:"FsDialog",__name:"FsDialog",props:{removeOnClosed:{type:Boolean,default:!0},appendToBody:{type:Boolean},appendTo:{},beforeClose:{},destroyOnClose:{type:Boolean},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{default:0},closeDelay:{default:0},top:{},modelValue:{type:Boolean},modalClass:{},width:{},zIndex:{},trapFocus:{type:Boolean},headerAriaLevel:{},center:{type:Boolean},alignCenter:{type:Boolean},closeIcon:{},draggable:{type:Boolean},overflow:{type:Boolean},fullscreen:{type:Boolean},showClose:{type:Boolean,default:!0},title:{},ariaLevel:{}},emits:["open","opened","close","closed","openAutoFocus","closeAutoFocus"],setup(i,{emit:n}){const r=i,o=n,u=()=>{o("closed",s.visible.value),r.removeOnClosed&&s.remove()},s=B();return(a,l)=>(e.openBlock(),e.createBlock(e.unref(f.ElDialog),e.mergeProps(r,{modelValue:e.unref(s).visible.value,"onUpdate:modelValue":l[0]||(l[0]=t=>e.unref(s).visible.value=t),onOpen:l[1]||(l[1]=t=>o("open",t)),onOpened:l[2]||(l[2]=t=>o("opened",t)),onCloseAutoFocus:l[3]||(l[3]=t=>o("closeAutoFocus",t)),onClose:l[4]||(l[4]=t=>o("close",t)),onClosed:u}),{header:e.withCtx(()=>[e.renderSlot(a.$slots,"header")]),footer:e.withCtx(()=>[e.renderSlot(a.$slots,"footer")]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16,["modelValue"]))}});exports.default=C;
//# sourceMappingURL=FsDialog.js.map
