import{W as d,e as c}from"./toggleHighContrast.483b4227.js";import{d as m,h as n,ag as g,L as p,D as f,o as v,c as y}from"./index.e3896b23.js";const _=["id"],B=m({__name:"readonly-studio",props:{id:{type:String,required:!0},value:{type:String,required:!1,default:()=>""}},setup(r,{expose:a}){const t=r,l=n("sql"),s=n("vs-dark");g(()=>{e.dispose(),console.log("editor dispose")}),p(()=>{i(),console.log("editor init")}),self.MonacoEnvironment={getWorker(o,u){return new d}};let e=null;const i=()=>{f(()=>{e?e.setValue(t.value):e=c.create(document.getElementById(t.id),{value:t.value,language:l.value,automaticLayout:!0,theme:s.value,renderLineHighlight:"all",selectOnLineNumbers:!0,minimap:{enabled:!0},cursorStyle:"line",readOnly:!0,fontSize:16,autoIndent:!0,useTabStops:!1,scrollBeyondLastLine:!1,overviewRulerBorder:!1})})};return a({setEditorValue:o=>{e.setValue(o)},getEditorValue:()=>e.getValue()}),(o,u)=>(v(),y("div",{id:r.id},null,8,_))}});export{B as _};
