import{g as B,E as w,G as H,j as p,H as V,v as i,o as c,k as g,w as s,b as u,y as n,L as C,a as d,l as b,I as k}from"./entry.eb978f24.js";import{_ as D}from"./_plugin-vue_export-helper.c27b6911.js";import{U as T,G as $,S as P,h as G}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 N=B({components:{HDialog:T,HDialogPanel:$,TransitionRoot:P,TransitionChild:G},props:{modelValue:{type:Boolean,default:!1},appear:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},transition:{type:Boolean,default:!0},preventClose:{type:Boolean,default:!1},ui:{type:Object,default:()=>w.ui.modal}},emits:["update:modelValue","close"],setup(e,{emit:a}){const m=H(),r=p(()=>V({},e.ui,m.ui.modal)),l=p({get(){return e.modelValue},set(o){a("update:modelValue",o)}}),f=p(()=>e.transition?{...r.value.transition}:{});function t(o){l.value=o,a("close")}return{ui:r,isOpen:l,transitionClass:f,close:t}}});function O(e,a,m,r,l,f){const t=i("TransitionChild"),o=i("HDialogPanel"),v=i("HDialog"),y=i("TransitionRoot");return c(),g(y,{appear:e.appear,show:e.isOpen,as:"template"},{default:s(()=>[u(v,{class:n(e.ui.wrapper),onClose:a[0]||(a[0]=h=>!e.preventClose&&e.close(h))},{default:s(()=>[e.overlay?(c(),g(t,C({key:0,as:"template",appear:e.appear},e.ui.overlay.transition),{default:s(()=>[d("div",{class:n([e.ui.overlay.base,e.ui.overlay.background])},null,2)]),_:1},16,["appear"])):b("",!0),d("div",{class:n(e.ui.inner)},[d("div",{class:n([e.ui.container,e.ui.padding])},[u(t,C({as:"template",appear:e.appear},e.transitionClass),{default:s(()=>[u(o,{class:n([e.ui.base,e.ui.width,e.ui.height,e.ui.background,e.ui.ring,e.ui.rounded,e.ui.shadow])},{default:s(()=>[k(e.$slots,"default")]),_:3},8,["class"])]),_:3},16,["appear"])],2)],2)]),_:3},8,["class"])]),_:3},8,["appear","show"])}const F=D(N,[["render",O]]);export{F as default};
