import{d as b,Z as h,a0 as L,cU as M,L as W,p as $,r as C,a as D,aq as N,n as B,o as l,c as u,w as i,f as E,cV as U,cv as f,g as q,t as z,h as A,b as T,aj as j,dc as F,dd as I,cQ as Q,cR as R,l as Z}from"./index-BlU6DPnP.js";const G=b({name:"DetailDrawer",__name:"detail-drawer",props:h({title:{},width:{}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:h(["update:modelValue","update:show","afterLeave"],["update:modelValue"]),setup(p,{emit:v}){const t=p,r=v,m=L(p,"modelValue"),x=M(),_=W(),a=$({width:0}),n=C(!1),y=D(()=>{if(t.width)return n.value?t.width[1]:t.width[0];const e=360,o=600;if(_.isMobile)return a.width*.9>=e?`${e}px`:"90%";let s=a.width*.3>=e?`${e}px`:"30%";s=a.width<=420?"90%":s;let d=a.width*.5>=o?`${o}px`:"50%";return d=a.width<=420?"90%":d,n.value?d:s}),c=()=>{a.width=document.documentElement.clientWidth};N(()=>{c(),window.addEventListener("resize",c)}),B(()=>{window.removeEventListener("resize",c)});const g=e=>{r("update:modelValue",e),r("update:show",e)},k=()=>{r("afterLeave")};return(e,o)=>{const s=F,d=I,V=Q,S=R;return l(),u(S,{show:m.value,"onUpdate:show":[o[1]||(o[1]=w=>m.value=w),g],"display-directive":"if",width:y.value,onAfterLeave:k},{default:i(()=>[E(V,{title:t.title,"native-scrollbar":!1,closable:"","header-class":"operate-dawer-header"},U({header:i(()=>[q(z(t.title)+" ",1),!A(_).isMobile&&(!t.width||t.width&&t.width[0]!==t.width[1])?(l(),T("div",{key:0,quaternary:"",class:"fullscreen text-18px color-#6a6a6a",onClick:o[0]||(o[0]=w=>n.value=!n.value)},[n.value?(l(),u(s,{key:0})):(l(),u(d,{key:1}))])):j("",!0)]),default:i(()=>[f(e.$slots,"default",{},void 0,!0)]),_:2},[x.footer?{name:"footer",fn:i(()=>[f(e.$slots,"footer",{},void 0,!0)]),key:"0"}:void 0]),1032,["title"])]),_:3},8,["show","width"])}}}),J=Z(G,[["__scopeId","data-v-ef3922d0"]]);export{J as _};
