import{u as w}from"./selectMenu.72ERhOvP.js";import{C as k,D as f,f as T,E as m,i as g,s as n,o as c,j as v,w as r,b as l,K as u,a as B,x as y,k as D,H}from"./entry.2xM5grDS.js";import{_ as V}from"./_plugin-vue_export-helper.x3n3nnut.js";import{U as S,G as $,S as j,h as F}from"./transition.kEykquSg.js";import"./dom.NeoUuiI0.js";import"./hidden.lsv8X6XQ.js";import"./focus-management.Eyc_TquK.js";import"./use-root-containers.o7oNpuCu.js";import"./use-outside-click.1YMc5Wv5.js";import"./micro-task.ZxAilEVg.js";import"./open-closed.qjT4kOuT.js";import"./disposables.MoseSqH0.js";const O={wrapper:"fixed inset-0 flex z-50",overlay:{base:"fixed inset-0 transition-opacity",background:"bg-gray-200/75 dark:bg-gray-800/75",transition:{enter:"ease-in-out duration-500",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in-out duration-500",leaveFrom:"opacity-100",leaveTo:"opacity-0"}},base:"relative flex-1 flex flex-col w-full focus:outline-none",background:"bg-white dark:bg-gray-900",ring:"",rounded:"",padding:"",shadow:"shadow-xl",width:"w-screen max-w-md",translate:{base:"translate-x-0",left:"-translate-x-full",right:"translate-x-full"},transition:{enter:"transform transition ease-in-out duration-300",leave:"transform transition ease-in-out duration-200"}},P=k(f.ui.strategy,f.ui.slideover,O),R=T({components:{HDialog:S,HDialogPanel:$,TransitionRoot:j,TransitionChild:F},inheritAttrs:!1,props:{modelValue:{type:Boolean,default:!1},appear:{type:Boolean,default:!1},side:{type:String,default:"right",validator:e=>["left","right"].includes(e)},overlay:{type:Boolean,default:!0},transition:{type:Boolean,default:!0},preventClose:{type:Boolean,default:!1},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},emits:["update:modelValue","close"],setup(e,{emit:t}){const{ui:a,attrs:p}=w("slideover",m(e,"ui"),P,m(e,"class")),i=g({get(){return e.modelValue},set(o){t("update:modelValue",o)}}),d=g(()=>e.transition?{...a.value.transition,enterFrom:e.side==="left"?a.value.translate.left:a.value.translate.right,enterTo:a.value.translate.base,leaveFrom:a.value.translate.base,leaveTo:e.side==="left"?a.value.translate.left:a.value.translate.right}:{});function s(o){i.value=o,t("close")}return{ui:a,attrs:p,isOpen:i,transitionClass:d,close:s}}});function N(e,t,a,p,i,d){const s=n("TransitionChild"),o=n("HDialogPanel"),h=n("HDialog"),b=n("TransitionRoot");return c(),v(b,{as:"template",appear:e.appear,show:e.isOpen},{default:r(()=>[l(h,u({class:[e.ui.wrapper,{"justify-end":e.side==="right"}]},e.attrs,{onClose:t[0]||(t[0]=C=>!e.preventClose&&e.close(C))}),{default:r(()=>[e.overlay?(c(),v(s,u({key:0,as:"template",appear:e.appear},e.ui.overlay.transition),{default:r(()=>[B("div",{class:y([e.ui.overlay.base,e.ui.overlay.background])},null,2)]),_:1},16,["appear"])):D("",!0),l(s,u({as:"template",appear:e.appear},e.transitionClass),{default:r(()=>[l(o,{class:y([e.ui.base,e.ui.width,e.ui.background,e.ui.ring,e.ui.padding])},{default:r(()=>[H(e.$slots,"default")]),_:3},8,["class"])]),_:3},16,["appear"])]),_:3},16,["class"])]),_:3},8,["appear","show"])}const W=V(R,[["render",N]]);export{W as default};
