import{d as v,e as B,B as m,W as S,D as _,br as T,f as s,o as c,g as t,h as n,j as D,a5 as O,k as z,J as p,l as M,n as N,F as V,L as l,M as i,q as $}from"./index-C8qz7c0N.js";const q=v({__name:"DialogBox",props:{show:{type:Boolean,default:!1},type:{default:"info"},confirmText:{default:"确认"},confirmPlain:{type:Boolean,default:!0},cancelText:{default:"取消"},iconSize:{default:"120rpx"},message:{default:""},tip:{default:""},showConfirm:{type:Boolean,default:!0},showCancel:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0}},emits:["update:show","confirm","cancel","close"],setup(x,{emit:y}){const e=x,a=y,h=B(()=>({success:"/static/icons/icon-success.png",error:"/static/icons/icon-error.png",info:"/static/icons/icon-info.png"})[e.type]);function w(){e.closeOnClickOverlay&&r()}function r(){a("update:show",!1),a("close")}function C(){a("confirm"),r()}function k(){a("cancel"),r()}return(f,u)=>{const g=M,o=D,d=m(_("wd-button"),S),b=m(_("wd-overlay"),T);return c(),s(b,{show:e.show,"z-index":999,onClick:w},{default:t(()=>[n(o,{class:"wrapper"},{default:t(()=>[n(o,{class:"w-full rounded-24rpx bg-white p-40rpx text-center",onClick:u[0]||(u[0]=O(()=>{},["stop"]))},{default:t(()=>[z(f.$slots,"default",{},()=>[n(g,{src:V(h),style:N({width:e.iconSize,height:e.iconSize})},null,8,["src","style"]),n(o,{class:"whitespace-pre-line pb-58rpx pt-34rpx text-center text-32rpx"},{default:t(()=>[l(i(e.message),1)]),_:1})],!0),n(o,{class:"button-container"},{default:t(()=>[e.showCancel?(c(),s(d,{key:0,class:"button-half",plain:"",block:"","custom-class":"text-#333! border-#333!",onClick:k},{default:t(()=>[l(i(e.cancelText),1)]),_:1})):p("",!0),e.showConfirm?(c(),s(d,{key:1,plain:e.confirmPlain,block:"",class:"button-half",type:"primary",onClick:C},{default:t(()=>[l(i(e.confirmText),1)]),_:1},8,["plain"])):p("",!0)]),_:1}),e.showTip&&e.tip?(c(),s(o,{key:0,class:"mt-20rpx text-24rpx text-gray-500"},{default:t(()=>[l(i(e.tip),1)]),_:1})):p("",!0)]),_:3})]),_:3})]),_:3},8,["show"])}}}),j=$(q,[["__scopeId","data-v-fcbec139"]]);export{j as D};
