import{u as B}from"./selectMenu.C9lwG85K.js";import{I as T,J as c,h as k,K as y,v as g,E as n,o as v,y as h,w as t,b as u,P as p,a as d,B as r,z as V,M as D}from"./entry.RGd0w9hd.js";import{_ as H}from"./_plugin-vue_export-helper.x3n3nnut.js";import{U as P,G as $,S as F,h as O}from"./transition.f0JkHJUw.js";import"./dom.vx4sd08t.js";import"./hidden.q9bj9KME.js";import"./focus-management.3ip_EPSh.js";import"./use-root-containers.SueRhLKF.js";import"./use-outside-click.4nsAJllP.js";import"./micro-task.ZxAilEVg.js";import"./open-closed.L86q9WWN.js";import"./disposables.MoseSqH0.js";const R={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"}},S=T(c.ui.strategy,c.ui.modal,R),j=k({components:{HDialog:P,HDialogPanel:$,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}=B("modal",y(e,"ui"),S,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 z(e,a,i,m,l,f){const s=n("TransitionChild"),o=n("HDialogPanel"),w=n("HDialog"),b=n("TransitionRoot");return v(),h(b,{appear:e.appear,show:e.isOpen,as:"template"},{default:t(()=>[u(w,p({class:e.ui.wrapper},e.attrs,{onClose:a[0]||(a[0]=C=>!e.preventClose&&e.close(C))}),{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"])):V("",!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(()=>[D(e.$slots,"default")]),_:3},8,["class"])]),_:3},16,["appear"])],2)],2)]),_:3},16,["class"])]),_:3},8,["appear","show"])}const W=H(j,[["render",z]]);export{W as default};
