import{u as k}from"./selectMenu.72ERhOvP.js";import{C as T,D as c,f as B,E as y,i as g,s as n,o as v,j as h,w as t,b as u,K as p,a as d,x as r,k as D,H}from"./entry.2xM5grDS.js";import{_ as V}from"./_plugin-vue_export-helper.x3n3nnut.js";import{U as $,G as j,S as F,h as O}from"./transition.kEykquSg.js";import"./dom.NeoUuiI0.js";import"./hidden.lsv8X6XQ.js";import"./focus-management.Eyc_TquK.js";import"./use-root-containers.o7oNpuCu.js";import"./use-outside-click.1YMc5Wv5.js";import"./micro-task.ZxAilEVg.js";import"./open-closed.qjT4kOuT.js";import"./disposables.MoseSqH0.js";const P={wrapper:"relative z-50",inner:"fixed inset-0 overflow-y-auto",container:"flex min-h-full items-end sm:items-center justify-center text-center",padding:"p-4 sm:p-0",margin:"sm:my-8",base:"relative text-left rtl:text-right overflow-hidden flex flex-col",overlay:{base:"fixed inset-0 transition-opacity",background:"bg-gray-200/75 dark:bg-gray-800/75",transition:{enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0"}},background:"bg-white dark:bg-gray-900",ring:"",rounded:"rounded-lg",shadow:"shadow-xl",width:"w-full sm:max-w-lg",height:"",fullscreen:"w-screen h-screen",transition:{enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"}},R=T(c.ui.strategy,c.ui.modal,P),S=B({components:{HDialog:$,HDialogPanel:j,TransitionRoot:F,TransitionChild:O},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},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},emits:["update:modelValue","close"],setup(e,{emit:a}){const{ui:i,attrs:m}=k("modal",y(e,"ui"),R,y(e,"class")),l=g({get(){return e.modelValue},set(o){a("update:modelValue",o)}}),f=g(()=>e.transition?{...i.value.transition}:{});function s(o){l.value=o,a("close")}return{ui:i,attrs:m,isOpen:l,transitionClass:f,close:s}}});function N(e,a,i,m,l,f){const s=n("TransitionChild"),o=n("HDialogPanel"),w=n("HDialog"),C=n("TransitionRoot");return v(),h(C,{appear:e.appear,show:e.isOpen,as:"template"},{default:t(()=>[u(w,p({class:e.ui.wrapper},e.attrs,{onClose:a[0]||(a[0]=b=>!e.preventClose&&e.close(b))}),{default:t(()=>[e.overlay?(v(),h(s,p({key:0,as:"template",appear:e.appear},e.ui.overlay.transition),{default:t(()=>[d("div",{class:r([e.ui.overlay.base,e.ui.overlay.background])},null,2)]),_:1},16,["appear"])):D("",!0),d("div",{class:r(e.ui.inner)},[d("div",{class:r([e.ui.container,!e.fullscreen&&e.ui.padding])},[u(s,p({as:"template",appear:e.appear},e.transitionClass),{default:t(()=>[u(o,{class:r([e.ui.base,e.ui.background,e.ui.ring,e.ui.shadow,e.fullscreen?e.ui.fullscreen:[e.ui.width,e.ui.height,e.ui.rounded,e.ui.margin]])},{default:t(()=>[H(e.$slots,"default")]),_:3},8,["class"])]),_:3},16,["appear"])],2)],2)]),_:3},16,["class"])]),_:3},8,["appear","show"])}const W=V(S,[["render",N]]);export{W as default};
