File: /home/dmstechonline/whatsapp.dmstech.online/public/build/assets/Modal-a947e544.js
import{o as n,f as h,g as e,j as s,u as t,a,c as i,h as v,t as w,b as d,J as y}from"./app-884e4ce3.js";import{h as c,G as x,V as g,U as _,S as b}from"./transition-15fedc5d.js";const k={class:"fixed inset-0 overflow-y-auto"},B={class:"flex min-h-full items-center justify-center p-4 text-center"},V={key:0,class:"flex justify-between items-center bg-gray-50 px-4 py-3"},S={class:"px-4 pb-4"},N={__name:"Modal",props:{label:String,isOpen:Boolean,closeBtn:Boolean,showHeader:{type:Boolean,default:!0}},emits:["close"],setup(r,{emit:u}){const l=r,p=u;function f(){p("close",!0)}return(m,o)=>(n(),h(t(b),{appear:"",show:l.isOpen,as:"template"},{default:e(()=>[s(t(_),{as:"div",class:"relative z-10"},{default:e(()=>[s(t(c),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0","enter-to":"opacity-100",leave:"duration-200 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:e(()=>o[0]||(o[0]=[a("div",{class:"fixed inset-0 bg-black bg-opacity-25"},null,-1)])),_:1}),a("div",k,[a("div",B,[s(t(c),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0 scale-95","enter-to":"opacity-100 scale-100",leave:"duration-200 ease-in","leave-from":"opacity-100 scale-100","leave-to":"opacity-0 scale-95"},{default:e(()=>[s(t(x),{class:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white text-left align-middle shadow-xl transition-all"},{default:e(()=>[l.showHeader!=!1?(n(),i("div",V,[s(t(g),{as:"h3",class:"text-lg font-medium leading-6 text-gray-900"},{default:e(()=>[v(w(l.label),1)]),_:1}),r.closeBtn===!0?(n(),i("span",{key:0,onClick:f,class:"bg-slate-100 rounded-full p-1 hover:shadow cursor-pointer"},o[1]||(o[1]=[a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[a("path",{fill:"none",stroke:"black","stroke-linecap":"round","stroke-linejoin":"round",d:"M17 7L7 17M7 7l10 10"})],-1)]))):d("",!0)])):d("",!0),a("div",S,[y(m.$slots,"default")])]),_:3})]),_:3})])])]),_:3})]),_:3},8,["show"]))}};export{N as _};