import{r as x,j as e,X as l,c}from"./index-CUDottTv.js";function m({open:r,onClose:t,title:s,subtitle:i,children:a,className:o}){return x.useEffect(()=>{if(!r)return;const n=d=>{d.key==="Escape"&&t()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[r,t]),r?e.jsxs("div",{className:c("w-[380px] shrink-0 border-l border-border-default bg-bg-surface flex flex-col overflow-hidden","animate-in slide-in-from-right duration-200",o),children:[e.jsxs("div",{className:"h-12 flex items-center justify-between px-4 border-b border-border-default shrink-0",children:[e.jsxs("div",{className:"min-w-0",children:[s&&e.jsx("h3",{className:"text-[13px] font-semibold text-text-primary truncate",children:s}),i&&e.jsx("p",{className:"text-[11px] text-text-tertiary truncate",children:i})]}),e.jsx("button",{onClick:t,className:"w-7 h-7 flex items-center justify-center rounded-md text-text-tertiary hover:text-text-primary hover:bg-bg-hover transition-colors cursor-pointer",children:e.jsx(l,{size:14})})]}),e.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-y-auto",children:a})]}):null}export{m as D};
