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