import{V as v,v as E,w as N}from"./style.488e5a30.js";import{N as A,l as F,B as I,a9 as e,Y as f,aq as P}from"./index.2e2ba873.js";var V="dialog",l=E+"_"+V,_=l+"--mask",M=l+"--footer",q=l+"--btn-cancel",O=l+"--btn-confirm",T={visible:{type:Boolean,default:!1},title:{type:String,default:""},mask:{type:Boolean,default:!0},width:{type:Number,default:520},isShowCloseIcon:{type:Boolean,default:!0},className:{type:String,default:""},wrapperClass:{type:String,default:""},center:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},isShowDefaultFooter:{type:Boolean,default:!0},el:{type:String,default:"body"},isShowEmpty:{type:Boolean,default:!1}},Y=A({name:"VDialog",inheritAttrs:!1,props:T,emits:["update:visible","cancel","ok"],setup:function(t,n){var a=n.slots;n.attrs;var s=n.emit;F(null);var r=function(){s("update:visible",!1),s("cancel")},m=function(){s("ok")},C=function(i){if(!!t.maskClosable){var o=document.getElementsByClassName(l+"--content")[0];o&&o.contains&&(o.contains(i.target)||r())}},h=function(){return e("div",{class:l+"--close",onClick:r},e("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.46967 0.46967C0.176777 0.762563 0.176777 1.23744 0.46967 1.53033L6.01041 7.07107L0.46967 12.6118C0.176777 12.9047 0.176777 13.3796 0.46967 13.6725C0.762564 13.9654 1.23744 13.9654 1.53033 13.6725L7.07107 8.13173L12.6118 13.6725C12.9047 13.9654 13.3796 13.9654 13.6725 13.6725C13.9654 13.3796 13.9654 12.9047 13.6725 12.6118L8.13173 7.07107L13.6725 1.53033C13.9654 1.23744 13.9654 0.762563 13.6725 0.46967C13.3796 0.176777 12.9047 0.176777 12.6118 0.46967L7.07107 6.01041L1.53033 0.46967C1.23744 0.176777 0.762563 0.176777 0.46967 0.46967Z",fill:"#9499A0"})))},w=I(function(){return t.isShowEmpty?"empty":""});return function(){var i,o,c,u,y=t.visible,p=t.mask,g=t.width,d=t.title,b=t.isShowCloseIcon,S=t.center,k=t.className,B=t.wrapperClass,D=t.isShowDefaultFooter,L=t.el,x=t.isShowEmpty;return y&&e(P,{to:L},e("div",{class:l+"--root "+B},p?e("div",{class:_}):"",e("div",{class:l+"--wrapper",onClick:C},e("div",{class:l+"--content "+k+" "+w.value,style:[{width:g+"px"},S?{textAlign:"center"}:""]},x?(i=a.default)===null||i===void 0?void 0:i.call(a):e(f,null,b?h():"",d?e("div",{class:l+"--title"},d):"",(o=a.default)===null||o===void 0?void 0:o.call(a),D?e("div",{class:[M]},!((c=a.footer)===null||c===void 0)&&c.call(a)?(u=a.footer)===null||u===void 0?void 0:u.call(a):e(f,null,e(v,{class:[l+"--btn",q],onClick:r},"\u53D6\u6D88"),e(v,{type:"blue",class:[l+"--btn",O],onClick:m},"\u786E\u5B9A"))):"")))))}}}),j=N(Y);export{j as D};
