import{$t as e,Bn as t,Hn as n,Mn as r,a as i,an as a,dn as o,on as s,rn as c,t as l,un as u,xn as d,yn as f,zn as p}from"#entry";var m={class:`sticky top-0 z-10 flex items-center justify-between px-5 py-4 max-sm:pt-[max(1rem,env(safe-area-inset-top))]`,style:{background:`var(--color-base-200)`,borderBottom:`1px solid var(--modal-border)`}},h={class:`flex items-center gap-3 text-lg font-bold text-base-content [&>svg]:text-primary`},g={key:0,class:`flex-1 overflow-y-auto p-5`},_={key:1,class:`sticky bottom-0 z-10 flex items-center justify-end px-5 py-4`,style:{background:`var(--color-base-200)`,borderTop:`1px solid var(--modal-border)`}},v={class:`flex justify-end gap-2`},y=Object.assign(l(o({__name:`Modal`,props:{title:{}},emits:[`close`],setup(o,{expose:l,emit:y}){let b=y,x=r(),S=r(!1),C=r(!1);function w(){x.value?.showModal(),C.value=!0,requestAnimationFrame(()=>{S.value=!0})}function T(){S.value=!1,setTimeout(()=>{x.value?.close(),C.value=!1,b(`close`)},240)}return l({open:w,close:T}),(r,l)=>(f(),s(`dialog`,{ref_key:`dialogRef`,ref:x,class:`modal modal-bottom sm:modal-middle`,style:{"--modal-border":`color-mix(in oklch, var(--color-base-content) 10%, transparent)`}},[c(`div`,{class:t([`modal-shell flex max-h-[90vh] w-[95%] max-w-2xl flex-col overflow-hidden rounded-2xl p-0 sm:w-11/12`,p(S)?`is-open`:``]),style:{background:`var(--color-base-100)`,border:`1px solid var(--modal-border)`,boxShadow:`0 25px 50px -12px color-mix(in oklch, var(--color-base-content) 25%, transparent), 0 0 0 1px var(--modal-border), inset 0 1px 0 0 color-mix(in oklch, var(--color-base-content) 6%, transparent)`},onContextmenu:l[0]||=e(()=>{},[`prevent`])},[c(`div`,m,[c(`div`,h,[d(r.$slots,`icon`,{},void 0,!0),c(`span`,null,n(o.title),1)]),c(`button`,{class:`modal-close flex h-8 w-8 cursor-pointer items-center justify-center rounded-lg bg-transparent`,style:{border:`1px solid var(--modal-border)`,color:`color-mix(in oklch, var(--color-base-content) 60%, transparent)`},onClick:T},[u(p(i),{size:18})])]),p(C)?(f(),s(`div`,g,[d(r.$slots,`default`,{},void 0,!0)])):a(``,!0),p(C)&&r.$slots.actions?(f(),s(`div`,_,[c(`div`,v,[d(r.$slots,`actions`,{},void 0,!0)])])):a(``,!0)],34),c(`form`,{method:`dialog`,class:`fixed inset-0 modal-backdrop -z-[1]`,style:{background:`color-mix(in oklch, var(--color-base-content) 50%, transparent)`}},[c(`button`,{class:`absolute inset-0 h-full w-full cursor-pointer border-none bg-transparent`,onClick:T})])],512))}}),[[`__scopeId`,`data-v-ec42d534`]]),{__name:`Modal`});export{y as t};