import{_ as x,a as y,b as B,c as k}from"./CiraBs1Q.js";import{_ as O}from"./Bc8qiPMc.js";import{e as p,c as C,o,X as r,I as h,n as a,W as v,Z as V,$ as _,m as n,w as t,b as g,C as c,a as M,d as u,t as f}from"./BoB2h2qv.js";const D=p({__name:"DialogFooter",props:{class:{}},setup(e){const l=e;return(d,i)=>(o(),C("div",{class:h(a(v)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",l.class))},[r(d.$slots,"default")],2))}}),E={class:"max-h-[80vh] overflow-scroll"},b=p({__name:"modal",props:V({title:{default:void 0},description:{default:void 0},size:{default:"md"},closeOnBackdrop:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},class:{default:void 0},contentClass:{default:void 0}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=e,d=_(e,"modelValue"),i={sm:"sm:max-w-md",md:"sm:max-w-lg",lg:"sm:max-w-2xl",xl:"sm:max-w-4xl"},$=s=>{d.value=s},m=s=>{l.closeOnBackdrop||s.preventDefault()},w=s=>{l.closeOnEscape||s.preventDefault()};return(s,z)=>(o(),n(a(x),{open:d.value,"onUpdate:open":$},{default:t(()=>[g(a(k),{class:h(a(v)(i[e.size],l.class,e.contentClass)),onPointerDownOutside:m,onInteractOutside:m,onEscapeKeyDown:w},{default:t(()=>[e.title||e.description||s.$slots.header?(o(),n(a(y),{key:0,class:"text-left"},{default:t(()=>[r(s.$slots,"header",{},()=>[e.title?(o(),n(a(B),{key:0},{default:t(()=>[u(f(e.title),1)]),_:1})):c("",!0),e.description?(o(),n(a(O),{key:1},{default:t(()=>[u(f(e.description),1)]),_:1})):c("",!0)])]),_:3})):c("",!0),M("div",E,[r(s.$slots,"default")]),e.showFooter&&s.$slots.footer?(o(),n(a(D),{key:1,class:"border-t pt-4"},{default:t(()=>[r(s.$slots,"footer")]),_:3})):c("",!0)]),_:3},8,["class"])]),_:3},8,["open"]))}}),I=Object.assign(b,{__name:"Modal"});export{I as M};
