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