import{l as e,f as t,o as a,c as n,w as o,a as s,j as l,h as c,t as f,u as r,m as i,d as u}from"./index-3714412c.js";import{P as p}from"./index.d0119d7e.js";import{_ as d}from"./_plugin-vue_export-helper.1b428a4d.js";const m=d({__name:"index",props:{content:{type:String,default:()=>""},confirmText:{type:String,default:()=>"确认"},cancelText:{type:String,default:()=>"取消"},showCancel:{type:Boolean,default:()=>!0},showConfirm:{type:Boolean,default:()=>!0}},emits:["confirm","cancel"],setup(d,{expose:m,emit:_}){const x=d,{content:h,confirmText:y,cancelText:w,showCancel:C,showConfirm:k}=e(x),g=t();function b(){g.value.close()}function j(e="confirm"){_(e),b()}return m({show:function(){g.value.show()},close:b}),(e,t)=>{const d=u;return a(),n(p,{ref_key:"popupRef",ref:g,showCloseable:!1,mode:"center"},{default:o((()=>[s(d,{class:"modal-inner"},{default:o((()=>[s(d,{class:"content"},{default:o((()=>[l(e.$slots,"default",{},(()=>[c(f(r(h)),1)]),!0)])),_:3}),r(C)||r(k)?(a(),n(d,{key:0,class:"btn-group"},{default:o((()=>[r(C)?(a(),n(d,{key:0,class:"btn cancel",onClick:t[0]||(t[0]=e=>j("cancel"))},{default:o((()=>[c(f(r(w)),1)])),_:1})):i("",!0),r(k)?(a(),n(d,{key:1,class:"btn",onClick:t[1]||(t[1]=e=>j("confirm"))},{default:o((()=>[c(f(r(y)),1)])),_:1})):i("",!0)])),_:1})):i("",!0)])),_:3})])),_:3},512)}}},[["__scopeId","data-v-394333ef"]]);export{m as M};
