import{aJ as c}from"./@ui-core-DKdciH1Z.js";import{W as d,a as g,l as r,m as p,g as f,F as b}from"./@monaco-editor-CSMpaClf.js";import{c as j}from"./index-D7KLAbvI.js";self.MonacoEnvironment={getWorker(e,t){return t==="json"?new d:new g}};r.config({monaco:p});r.init().then(e=>{e.editor.defineTheme("github-light",f)});function E({jsonSchema:e,value:t,onChange:i,modelId:o,className:h,onValidationChange:l}){const n=`${o}.json`,m=(s,a)=>{a.languages.json.jsonDefaults.setDiagnosticsOptions({enableSchemaRequest:!0,validate:!0,schemas:[{uri:`model-input-schema-${o}.json`,fileMatch:[n],schema:e}]})},u=s=>{const a=s.length>0;l?.(a)};return c.jsx(b,{theme:"github-light",path:n,value:t,onChange:i,language:"json",options:{minimap:{enabled:!1}},className:j("h-full border border-theme-border-moderate",h),onMount:m,onValidate:u})}export{E as J};
