var N=Object.defineProperty;var x=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var v=(l,o,e)=>o in l?N(l,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[o]=e,h=(l,o)=>{for(var e in o||(o={}))V.call(o,e)&&v(l,e,o[e]);if(x)for(var e of x(o))$.call(o,e)&&v(l,e,o[e]);return l};var y=(l,o,e)=>new Promise((p,s)=>{var d=t=>{try{i(e.next(t))}catch(a){s(a)}},n=t=>{try{i(e.throw(t))}catch(a){s(a)}},i=t=>t.done?p(t.value):Promise.resolve(t.value).then(d,n);i((e=e.apply(l,o)).next())});import{p as f,t as H}from"./index-OziN21LA.js";import{g as T,aa as B}from"./element-plus-C2aeItNs.js";import{l as D,L as j,e as k,r as b,w as E,ai as O,m as w,M as S,a9 as A,u as c,O as m,K as F,a1 as I,H as g,q as _,S as q,T as z,R as J,U as C,J as K,n as L}from"./vue-chunks-l-AyUCfi.js";const M={class:"flex justify-between items-center h-54px pl-15px pr-15px relative"},P={class:"h-54px flex justify-between items-center absolute top-[50%] right-15px translate-y-[-50%]"},W=D({__name:"Dialog",props:{modelValue:f.bool.def(!1),title:f.string.def("Dialog"),fullscreen:f.bool.def(!0),maxHeight:f.oneOfType([String,Number]).def("400px")},setup(l){const o=j(),e=l,p=k(()=>{const t=["fullscreen","title","maxHeight"],a=I(),r=h(h({},a),e);for(const u in r)t.indexOf(u)!==-1&&delete r[u];return r}),s=b(!1),d=()=>{s.value=!c(s)},n=b(H(e.maxHeight)?`${e.maxHeight}px`:e.maxHeight);E(()=>s.value,t=>y(this,null,function*(){if(yield L(),t){const a=document.documentElement.offsetHeight;n.value=`${a-55-60-(o.footer?63:0)}px`}else n.value=H(e.maxHeight)?`${e.maxHeight}px`:e.maxHeight}),{immediate:!0});const i=k(()=>({height:c(n)}));return(t,a)=>{const r=O("Icon");return w(),S(c(B),F(p.value,{fullscreen:s.value,"destroy-on-close":"","lock-scroll":"",draggable:"",top:"0","close-on-click-modal":!1,"show-close":!1}),A({header:m(({close:u})=>[_("div",M,[g(t.$slots,"title",{},()=>[q(z(l.title),1)]),_("div",P,[l.fullscreen?(w(),S(r,{key:0,class:"cursor-pointer is-hover !h-54px mr-10px",icon:s.value?"radix-icons:exit-full-screen":"radix-icons:enter-full-screen",color:"var(--el-color-info)","hover-color":"var(--el-color-primary)",onClick:d},null,8,["icon"])):J("",!0),C(r,{class:"cursor-pointer is-hover !h-54px",icon:"ep:close","hover-color":"var(--el-color-primary)",color:"var(--el-color-info)",onClick:u},null,8,["onClick"])])])]),default:m(()=>[C(c(T),{style:K(i.value)},{default:m(()=>[g(t.$slots,"default")]),_:3},8,["style"])]),_:2},[c(o).footer?{name:"footer",fn:m(()=>[g(t.$slots,"footer")]),key:"0"}:void 0]),1040,["fullscreen"])}}});export{W as _};
