import{d as C,r as b,au as S,_ as $,c as s,e as c,f as w,g as i,G as g,h as p,B as E,i as t,m as d,t as r,k as y,A as B,H as T}from"./index.0308b213.js";const V=C({components:{},props:{title:{type:String,default:""},content:{type:String,default:"\u786E\u8BA4\u8981\u5220\u9664\uFF1F"},confirmButtonText:{type:[String,Boolean],default:"\u786E\u8BA4"},cancelButtonText:{type:[String,Boolean],default:"\u53D6\u6D88"},width:{type:String,default:"400px"},disabled:{type:Boolean,default:!1},async:{type:Boolean,default:!1},clickModalClose:{type:Boolean,default:!0},customClass:{type:String,default:""}},emits:["confirm","cancel"],setup(e,{emit:o}){const l=b(!1),f=a=>{o(a),(!e.async||a==="cancel")&&u()},u=()=>{l.value=!1},m=()=>{e.disabled||(l.value=!0)};return S("visible",l),{visible:l,handleEvent:f,close:u,open:m}}});const h={class:"dialog"},A={class:"dialog-footer"};function z(e,o,l,f,u,m){const a=s("warning-filled"),_=s("el-icon"),v=s("el-button"),k=s("el-dialog");return c(),w("div",h,[i("div",{class:"dialog__trigger",onClick:o[0]||(o[0]=(...n)=>e.open&&e.open(...n))},[g(e.$slots,"trigger",{},void 0,!0)]),p(k,{modelValue:e.visible,"onUpdate:modelValue":o[3]||(o[3]=n=>e.visible=n),class:T(e.customClass),"append-to-body":!0,width:e.width,"close-on-click-modal":e.clickModalClose},E({footer:t(()=>[i("div",A,[e.cancelButtonText?(c(),y(v,{key:0,size:"small",onClick:o[1]||(o[1]=n=>e.handleEvent("cancel"))},{default:t(()=>[d(r(e.cancelButtonText),1)]),_:1})):B("",!0),e.confirmButtonText?(c(),y(v,{key:1,size:"small",type:"primary",onClick:o[2]||(o[2]=n=>e.handleEvent("confirm"))},{default:t(()=>[d(r(e.confirmButtonText),1)]),_:1})):B("",!0)])]),default:t(()=>[g(e.$slots,"default",{},()=>[d(r(e.content),1)],!0)]),_:2},[e.title?{name:"header",fn:t(()=>[d(r(e.title),1)])}:{name:"header",fn:t(()=>[i("div",{class:"flex col-center"},[p(_,{size:25,color:e.$variables.color_warning},{default:t(()=>[p(a)]),_:1},8,["color"]),i("span",{class:"m-l-6"},"\u6E29\u99A8\u63D0\u793A")])])}]),1032,["modelValue","class","width","close-on-click-modal"])])}const N=$(V,[["render",z],["__scopeId","data-v-910578e2"]]);export{N as P};
