import{r as s,j as e,n,o as x,c as p}from"./index-CUDottTv.js";function u({children:t,language:o,className:a,copyable:d=!0}){const[c,r]=s.useState(!1),i=s.useCallback(()=>{navigator.clipboard.writeText(t),r(!0),setTimeout(()=>r(!1),2e3)},[t]);return e.jsxs("div",{className:p("relative group rounded-md border border-border-default bg-bg-input",a),children:[d&&e.jsx("button",{onClick:i,className:"absolute top-2 right-2 p-1.5 rounded-md text-text-muted hover:text-text-secondary hover:bg-bg-hover opacity-0 group-hover:opacity-100 transition-all cursor-pointer",children:c?e.jsx(n,{size:14}):e.jsx(x,{size:14})}),o&&e.jsx("div",{className:"px-3 py-1.5 border-b border-border-muted",children:e.jsx("span",{className:"text-[10px] font-medium text-text-muted uppercase tracking-wider",children:o})}),e.jsx("pre",{className:"p-3 overflow-x-auto",children:e.jsx("code",{className:"font-mono text-[13px] leading-relaxed text-text-secondary",children:t})})]})}export{u as C};
