import{g as V,_ as x,o as E,M as h,a as k}from"./BHSDjEX4.js";import{d as w,s as i,W as M,bz as b,h as T,i as B,o as m,c as C,e as $,f as y,w as N,a9 as u,u as a,ap as R}from"./Bxv1kRJt.js";import"./Dqibp0CK.js";import"./o_ViDd08.js";import"./DafvsEAY.js";import"./DRpV4Qhx.js";import"./D6NrV7C8.js";import"./BkY4Kcec.js";import"./oNASYLMO.js";const L={class:"monaco-editor !outline-none pb-10"},O={class:"h-full w-full relative"},z=w({__name:"EditorText",props:{modelValue:{},lang:{default:"mdc"}},emits:["update:modelValue","focus","blur"],setup(c,{emit:p}){const s=c,_=p,n=i({get:()=>s.modelValue,set(e){_("update:modelValue",e)}}),l=M(),o=i(()=>l.value?.$editor),r=b({storageKey:"unpress-color-mode"}),f=V(r,s.lang);return T(r,e=>{o.value?._themeService.setTheme(`vs-${e}`)}),(e,t)=>{const v=x,g=k;return m(),B("div",L,[o.value?(m(),C(g,{key:0,editor:o.value},{default:N(()=>[u(v,{editor:o.value},null,8,["editor"])]),_:1},8,["editor"])):$("",!0),y("div",O,[u(a(h),{ref_key:"editorRef",ref:l,modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=d=>n.value=d),class:"text-monaco-editor inset-0 absolute",options:a(f),lang:e.lang,"data-testid":"editor",onLoad:t[1]||(t[1]=d=>a(E)(o.value,e.lang))},null,8,["modelValue","options","lang"])])])}}}),F=R(z,[["__scopeId","data-v-034218ec"]]);export{F as default};
