import{d as v,r as y,w as c,_ as B,o as i,k as _,b as d,p as g,c as m,a as t,l as a,z as k,q as n,t as u,n as x,F as b}from"./app-DZcRemIr.js";import{a as V}from"./SiifIconBC3-DYQKLzWx.js";import{B as F}from"./index-CA0zsXLm.js";import{D as z,a as S,b as T,c as h,d as H,e as M,f as N}from"./DialogTitle-lOvm0yQI.js";import{D as j,a as U,b as q,c as A,d as E,e as O,f as P}from"./AppSidebarLayout-DzMma2g7.js";const Q=v({__name:"BaseModal",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},description:{type:String,default:""},size:{type:String,default:"md"}},emits:["update:modelValue"],setup(l,{expose:r,emit:o}){r();const e=l,D=o,w=V("(min-width: 768px)"),s=y(e.modelValue);c(()=>e.modelValue,f=>s.value=f),c(s,f=>D("update:modelValue",f));const C={sm:"sm:max-w-[360px]",md:"sm:max-w-[425px]",lg:"sm:max-w-[800px]",xl:"w-[90vw] max-w-[1200px]"}[e.size]||"sm:max-w-[425px]",p={props:e,emit:D,isDesktop:w,open:s,sizeClasses:C,get Button(){return F},get Dialog(){return N},get DialogContent(){return M},get DialogHeader(){return H},get DialogTitle(){return h},get DialogDescription(){return T},get DialogFooter(){return S},get DialogClose(){return z},get Drawer(){return P},get DrawerContent(){return O},get DrawerHeader(){return E},get DrawerTitle(){return A},get DrawerDescription(){return q},get DrawerFooter(){return U},get DrawerClose(){return j}};return Object.defineProperty(p,"__isScriptSetup",{enumerable:!1,value:!0}),p}}),G={class:"mt-4 space-y-4"},I={class:"flex-1 overflow-y-auto px-4 space-y-6"};function J(l,r,o,e,D,w){return i(),_("div",null,[d(l.$slots,"trigger"),g(" Desktop Dialog "),e.isDesktop?(i(),m(e.Dialog,{key:0,open:e.open,"onUpdate:open":r[0]||(r[0]=s=>e.open=s)},{default:t(()=>[a(e.DialogContent,{class:k(`${e.sizeClasses} fixed left-1/2 top-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 sm:rounded-lg overflow-x-auto`)},{default:t(()=>[a(e.DialogHeader,null,{default:t(()=>[a(e.DialogTitle,null,{default:t(()=>[n(u(o.title),1)]),_:1}),o.description?(i(),m(e.DialogDescription,{key:0},{default:t(()=>[n(u(o.description),1)]),_:1})):g("v-if",!0)]),_:1}),x("div",G,[d(l.$slots,"default")]),a(e.DialogFooter,{class:"mt-6 text-right"},{default:t(()=>[d(l.$slots,"footer",{},()=>[a(e.DialogClose,{"as-child":""},{default:t(()=>[a(e.Button,{variant:"ghost"},{default:t(()=>[...r[2]||(r[2]=[n("Cerrar",-1)])]),_:1})]),_:1})])]),_:3})]),_:3},8,["class"])]),_:3},8,["open"])):(i(),_(b,{key:1},[g(" Mobile Drawer "),a(e.Drawer,{open:e.open,"onUpdate:open":r[1]||(r[1]=s=>e.open=s)},{default:t(()=>[a(e.DrawerContent,{class:"max-h-[90vh] flex flex-col"},{default:t(()=>[x("div",I,[a(e.DrawerHeader,null,{default:t(()=>[a(e.DrawerTitle,null,{default:t(()=>[n(u(o.title),1)]),_:1}),o.description?(i(),m(e.DrawerDescription,{key:0},{default:t(()=>[n(u(o.description),1)]),_:1})):g("v-if",!0)]),_:1}),d(l.$slots,"default")]),a(e.DrawerFooter,{class:"pt-4 text-right px-4"},{default:t(()=>[d(l.$slots,"footer",{},()=>[a(e.DrawerClose,{"as-child":""},{default:t(()=>[a(e.Button,{variant:"ghost"},{default:t(()=>[...r[3]||(r[3]=[n("Cerrar",-1)])]),_:1}),a(e.Button,{variant:"ghost"},{default:t(()=>[...r[4]||(r[4]=[n("Agregar",-1)])]),_:1})]),_:1})])]),_:3})]),_:3})]),_:3},8,["open"])],2112))])}const Y=B(Q,[["render",J],["__file","/var/www/resources/js/components/BaseModal.vue"]]);export{Y as B};
