import{J as B,u as T}from"./ui.config.7ae255de.js";import{E as H,G as f,g as V,j as m,v as r,o as g,k as c,w as t,b as i,K as p,a as b,y as v,l as k,H as w}from"./entry.9e31e8a4.js";import{_ as D}from"./_plugin-vue_export-helper.c27b6911.js";import{U as S,G as $,S as P,h as j}from"./transition.1da9f377.js";import"./dom.737f30ce.js";import"./hidden.1f99b477.js";import"./focus-management.fbd5ae77.js";import"./use-root-containers.d4b33a5d.js";import"./use-outside-click.047f3b08.js";import"./micro-task.89dcd6af.js";import"./open-closed.4ff1261a.js";import"./disposables.57da4964.js";const G=H(f.ui.strategy,f.ui.slideover,B),N=V({components:{HDialog:S,HDialogPanel:$,TransitionRoot:P,TransitionChild:j},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},ui:{type:Object,default:void 0}},emits:["update:modelValue","close"],setup(e,{emit:a}){const{ui:l,attrs:u}=T("slideover",e.ui,G,{mergeWrapper:!0}),n=m({get(){return e.modelValue},set(o){a("update:modelValue",o)}}),d=m(()=>e.transition?{...l.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){n.value=o,a("close")}return{ui:l,attrs:u,isOpen:n,transitionClass:d,close:s}}});function O(e,a,l,u,n,d){const s=r("TransitionChild"),o=r("HDialogPanel"),y=r("HDialog"),C=r("TransitionRoot");return g(),c(C,{as:"template",appear:e.appear,show:e.isOpen},{default:t(()=>[i(y,p({class:[e.ui.wrapper,{"justify-end":e.side==="right"}]},e.attrs,{onClose:a[0]||(a[0]=h=>!e.preventClose&&e.close(h))}),{default:t(()=>[e.overlay?(g(),c(s,p({key:0,as:"template",appear:e.appear},e.ui.overlay.transition),{default:t(()=>[b("div",{class:v([e.ui.overlay.base,e.ui.overlay.background])},null,2)]),_:1},16,["appear"])):k("",!0),i(s,p({as:"template",appear:e.appear},e.transitionClass),{default:t(()=>[i(o,{class:v([e.ui.base,e.ui.width,e.ui.background,e.ui.ring,e.ui.padding])},{default:t(()=>[w(e.$slots,"default")]),_:3},8,["class"])]),_:3},16,["appear"])]),_:3},16,["class"])]),_:3},8,["appear","show"])}const M=D(N,[["render",O]]);export{M as default};
