import{$ as e,Et as t,G as n,J as r,Q as i,V as a,ft as o,kt as s,lt as c,q as l,st as u,yt as d}from"./SdXlftKS.js";import{i as f}from"./WbzNIdgT.js";import{t as p}from"./D7QqM6sF.js";var m={class:`sticky top-0 z-50 flex items-center justify-between bg-base-100/80 p-4 backdrop-blur`,style:{"padding-top":`max(1rem, env(safe-area-inset-top))`}},h={class:`flex items-center gap-4 text-xl font-bold`},g={class:`p-4`},_={key:0,class:`sticky bottom-0 z-50 flex items-center justify-end bg-base-100/80 p-4 backdrop-blur`},v={class:`flex justify-end gap-2`},y=e({__name:`Modal`,props:{title:{}},emits:[`close`],setup(e,{expose:y,emit:b}){let x=b,S=d();function C(){S.value?.showModal()}function w(){S.value?.close(),x(`close`)}return y({open:C,close:w}),(d,y)=>{let b=p;return u(),r(`dialog`,{ref_key:`dialogRef`,ref:S,class:`modal modal-bottom sm:modal-middle`},[n(`div`,{class:`modal-box p-0`,onContextmenu:y[0]||=a(()=>{},[`prevent`])},[n(`div`,m,[n(`div`,h,[c(d.$slots,`icon`),n(`span`,null,s(e.title),1)]),i(b,{class:`btn-circle btn-sm`,onClick:w},{default:o(()=>[i(t(f),{size:20})]),_:1})]),n(`div`,g,[c(d.$slots,`default`)]),d.$slots.actions?(u(),r(`div`,_,[n(`div`,v,[c(d.$slots,`actions`)])])):l(``,!0)],32),y[1]||=n(`form`,{method:`dialog`,class:`modal-backdrop`},[n(`button`)],-1)],512)}}}),b=Object.assign(y,{__name:`Modal`});export{b as t};