import{c as d,r as c,j as o}from"./vendor-tanstack-BpuysabX.js";import{u as g,E as x,p as b}from"./vendor-codemirror-q5gL9Jwo.js";import{q as y,I as v,b4 as C,y as j}from"./index-CREafGO4.js";import"./vendor-radix-DIu41Ss_.js";import"./vendor-recharts-C2XeLr4O.js";import"./vendor-forms-Buh7U8Ay.js";import"./vendor-date-C1t37jsh.js";const w=[b(),x.lineWrapping],E=d.forwardRef(({className:l,value:s,onChange:p,copy:u=!1,onBlur:N,disabled:r,hideLineNumbers:h=!1,...f},i)=>{const e=c.useRef(null);let n;r&&(n={lineNumbers:!h,highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1});const{setContainer:a}=g({container:e.current,extensions:w,value:s,onChange:p,indentWithTab:!1,editable:!r,basicSetup:n});c.useEffect(()=>{e.current&&a(e.current)},[a]);const m=t=>{j.success("Copied to clipboard"),navigator.clipboard.writeText(t)};return o.jsx("div",{className:C("rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative",l),ref:t=>{e.current=t,typeof i=="function"?i(t):i&&(i.current=t)},...f,children:u&&s&&o.jsx(y,{onClick:()=>m(s),variant:"ghost",size:"icon",className:"absolute top-0 right-0 z-10","aria-label":"copy",children:o.jsx(v,{id:"Copy",className:"size-2"})})})});E.displayName="PythonInput";export{E as PythonInput};
//# sourceMappingURL=python-input-CziWCQkr.js.map
