"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("element-plus"),m=Symbol("ModalStateToken"),p=Symbol("ModalIdToken"),y=()=>e.inject(m,{}),b=()=>e.inject(p,"");function g(){const{store:d,action:n,modalPromise:l}=y(),t=b(),i=d[t],c=a=>n==null?void 0:n.show(t,a),r=()=>n==null?void 0:n.hide(t),o=()=>n==null?void 0:n.remove(t),s=a=>l[t].resolve(a),u=a=>l[t].reject(a);return{show:c,hide:r,visible:e.toRef(i,"visible"),args:e.toRef(i,"args"),remove:o,resolve:s,reject:u}}const v={class:"dialog-footer"},T=e.defineComponent({name:"FsPopupFooter",__name:"FsPopupFooter",props:{confirmLoading:{type:Boolean},confirmText:{default:"确认"},cancelText:{default:"取消"},confirmType:{default:"primary"},cancelType:{default:"default"},confirmDisabled:{type:Boolean,default:!1},cancelDisabled:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(d,{emit:n}){const l=g(),t=o=>{l.hide(),l.resolve(o)},i=n,c=()=>{i("confirm",t)},r=()=>{i("cancel",t)};return(o,s)=>(e.openBlock(),e.createElementBlock("div",v,[e.createVNode(e.unref(f.ElButton),{type:o.cancelType,disabled:o.cancelDisabled,loading:o.confirmLoading,onClick:r},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.cancelText),1)]),_:1},8,["type","disabled","loading"]),e.createVNode(e.unref(f.ElButton),{type:o.confirmType,disabled:o.confirmDisabled,loading:o.confirmLoading,onClick:c},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.confirmText),1)]),_:1},8,["type","disabled","loading"])]))}});exports.default=T;
//# sourceMappingURL=FsPopupFooter.js.map
