import{u as w}from"./selectMenu.C9lwG85K.js";import{I as T,J as f,h as k,K as m,v as g,E as n,o as c,y as v,w as r,b as l,P as u,a as B,B as y,z as V,M as D}from"./entry.RGd0w9hd.js";import{_ as H}from"./_plugin-vue_export-helper.x3n3nnut.js";import{U as S,G as P,S as $,h as F}from"./transition.f0JkHJUw.js";import"./dom.vx4sd08t.js";import"./hidden.q9bj9KME.js";import"./focus-management.3ip_EPSh.js";import"./use-root-containers.SueRhLKF.js";import"./use-outside-click.4nsAJllP.js";import"./micro-task.ZxAilEVg.js";import"./open-closed.L86q9WWN.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"}},R=T(f.ui.strategy,f.ui.slideover,O),j=k({components:{HDialog:S,HDialogPanel:P,TransitionRoot:$,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"),R,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 z(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"])):V("",!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(()=>[D(e.$slots,"default")]),_:3},8,["class"])]),_:3},16,["appear"])]),_:3},16,["class"])]),_:3},8,["appear","show"])}const W=H(j,[["render",z]]);export{W as default};
