import{c as d,r as c,j as s}from"./vendor-tanstack-BVzzyDEt.js";import{u as g,p as x,E as b}from"./vendor-codemirror-BQuppSRL.js";import{aU as y,q as v,I as w,w as C}from"./index-BJkJ93Lr.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CTAic6HB.js";import"./vendor-recharts-Mwm2qLZp.js";import"./vendor-forms-BN3tpxM2.js";import"./vendor-date-2jFo9aCm.js";const j=[x(),b.lineWrapping],E=d.forwardRef(({className:l,value:o,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:j,value:o,onChange:p,indentWithTab:!1,editable:!r,basicSetup:n});c.useEffect(()=>{e.current&&a(e.current)},[a]);const m=t=>{C.success("Copied to clipboard"),navigator.clipboard.writeText(t)};return s.jsx("div",{className:y("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&&o&&s.jsx(v,{onClick:()=>m(o),variant:"ghost",size:"icon",className:"absolute top-0 right-0 z-10","aria-label":"copy",children:s.jsx(w,{id:"Copy",className:"size-2"})})})});E.displayName="PythonInput";export{E as PythonInput};
//# sourceMappingURL=python-input-6NfZoEIA.js.map
