import{g as h,E as B,G as T,j as i,H,v as l,o as m,k as c,w as t,b as p,y as u,L as g,a as V,l as b,I as k}from"./entry.eb978f24.js";import{_ as w}from"./_plugin-vue_export-helper.c27b6911.js";import{U as D,G as S,S as $,h as P}from"./transition.c5609bff.js";import"./dom.2ed3c503.js";import"./hidden.a9dcbbf7.js";import"./focus-management.165c4009.js";import"./use-root-containers.d73e9aa0.js";import"./use-outside-click.0a4bdcf3.js";import"./micro-task.89dcd6af.js";import"./open-closed.41cbc312.js";import"./disposables.57da4964.js";const j=h({components:{HDialog:D,HDialogPanel:S,TransitionRoot:$,TransitionChild:P},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},ui:{type:Object,default:()=>B.ui.slideover}},emits:["update:modelValue","close"],setup(e,{emit:a}){const d=T(),n=i(()=>H({},e.ui,d.ui.slideover)),r=i({get(){return e.modelValue},set(o){a("update:modelValue",o)}}),f=i(()=>e.transition?{...n.value.transition,enterFrom:e.side==="left"?"-translate-x-full":"translate-x-full",enterTo:"translate-x-0",leaveFrom:"translate-x-0",leaveTo:e.side==="left"?"-translate-x-full":"translate-x-full"}:{});function s(o){r.value=o,a("close")}return{ui:n,isOpen:r,transitionClass:f,close:s}}});function G(e,a,d,n,r,f){const s=l("TransitionChild"),o=l("HDialogPanel"),v=l("HDialog"),C=l("TransitionRoot");return m(),c(C,{as:"template",appear:e.appear,show:e.isOpen},{default:t(()=>[p(v,{class:u([e.ui.wrapper,{"justify-end":e.side==="right"}]),onClose:a[0]||(a[0]=y=>!e.preventClose&&e.close(y))},{default:t(()=>[e.overlay?(m(),c(s,g({key:0,as:"template",appear:e.appear},e.ui.overlay.transition),{default:t(()=>[V("div",{class:u([e.ui.overlay.base,e.ui.overlay.background])},null,2)]),_:1},16,["appear"])):b("",!0),p(s,g({as:"template",appear:e.appear},e.transitionClass),{default:t(()=>[p(o,{class:u([e.ui.base,e.ui.width,e.ui.background,e.ui.ring,e.ui.padding])},{default:t(()=>[k(e.$slots,"default")]),_:3},8,["class"])]),_:3},16,["appear"])]),_:3},8,["class"])]),_:3},8,["appear","show"])}const q=w(j,[["render",G]]);export{q as default};
