import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{f as t,n,r}from"./createLucideIcon-XxmMb-o2.js";import{w as i}from"./app-BvqieymH.js";var a=r(),o=e(t(),1),s=n();function c(e){let t=(0,a.c)(26),{open:n,onClose:r,title:c,children:l,footer:u}=e,d,f;if(t[0]!==r||t[1]!==n?(d=()=>{if(!n)return;let e=e=>{e.key===`Escape`&&r()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},f=[n,r],t[0]=r,t[1]=n,t[2]=d,t[3]=f):(d=t[2],f=t[3]),(0,o.useEffect)(d,f),!n)return null;let p;t[4]===r?p=t[5]:(p=(0,s.jsx)(`div`,{className:`animate-backdrop-enter absolute inset-0 bg-black/40`,onClick:r}),t[4]=r,t[5]=p);let m;t[6]===c?m=t[7]:(m=(0,s.jsx)(`h2`,{className:`text-[16px] font-semibold`,children:c}),t[6]=c,t[7]=m);let h;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,s.jsx)(i,{className:`h-4 w-4 text-ink`,"aria-hidden":`true`}),t[8]=h):h=t[8];let g;t[9]===r?g=t[10]:(g=(0,s.jsx)(`button`,{type:`button`,onClick:r,"aria-label":`Close`,className:`flex h-8 w-8 items-center justify-center rounded-full hover:bg-line-soft`,children:h}),t[9]=r,t[10]=g);let _;t[11]!==m||t[12]!==g?(_=(0,s.jsxs)(`div`,{className:`flex items-center justify-between border-b border-line px-4 py-3.5`,children:[m,g]}),t[11]=m,t[12]=g,t[13]=_):_=t[13];let v;t[14]===l?v=t[15]:(v=(0,s.jsx)(`div`,{className:`flex-1 overflow-y-auto px-4 py-4`,children:l}),t[14]=l,t[15]=v);let y;t[16]===u?y=t[17]:(y=u&&(0,s.jsx)(`div`,{className:`flex gap-2 border-t border-line bg-white px-4 py-3`,children:u}),t[16]=u,t[17]=y);let b;t[18]!==_||t[19]!==v||t[20]!==y?(b=(0,s.jsxs)(`div`,{className:`animate-sheet-enter relative flex max-h-[85vh] w-full max-w-[430px] flex-col rounded-t-2xl bg-white`,children:[_,v,y]}),t[18]=_,t[19]=v,t[20]=y,t[21]=b):b=t[21];let x;return t[22]!==b||t[23]!==p||t[24]!==c?(x=(0,s.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-end justify-center`,role:`dialog`,"aria-modal":`true`,"aria-label":c,children:[p,b]}),t[22]=b,t[23]=p,t[24]=c,t[25]=x):x=t[25],x}export{c as t};