"use strict";var w=Object.create;var p=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var v=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of f(t))!b.call(e,i)&&i!==n&&p(e,i,{get:()=>t[i],enumerable:!(s=k(t,i))||s.enumerable});return e};var c=(e,t,n)=>(n=e!=null?w(x(e)):{},v(t||!e||!e.__esModule?p(n,"default",{value:e,enumerable:!0}):n,e));const r=require("./externalizeComponent-CkVWk2F_.cjs"),u=require("react"),C=require("@mui/material"),T=require("./LoadingCover-CukpS_aj.cjs"),y={$schema:"https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",name:"wandelscript",patterns:[{include:"#keywords"},{include:"#strings"},{include:"#comments"},{include:"#functions"}],repository:{keywords:{patterns:[{name:"keyword.control.flow.wandelscript",match:"\\b(move|via|to|interrupt|def|False|True|for|if|else|elif|while|return|switch|activate|deactivate|print|and|or|not)\\b"}]},strings:{name:"string.quoted.double.wandelscript",begin:'"',end:'"',patterns:[{name:"constant.character.escape.wandelscript",match:"\\\\."}]},comments:{patterns:[{begin:"#",beginCaptures:{0:{name:"punctuation.definition.comment.wandelscript"}},end:"$",name:"comment.line.number-sign.wandelscript"}]},functions:{patterns:[{match:"[a-zA-Z_-]+\\(",name:"entity.name.function.wandelscript"}]}},scopeName:"source.wandelscript"},E=u.lazy(()=>import("@monaco-editor/react"));let l=null;async function S(){if(!l){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);l={shiki:await e({langs:[y],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return l}const j=r.externalizeComponent(e=>{const t=C.useTheme(),[n,s]=u.useState("dark-plus"),i=t.palette.mode==="dark"?"dark-plus":"light-plus";async function g(a){var m,d;a.languages.register({id:"wandelscript"}),a.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:o,shikiToMonaco:h}=await S();h(o,a),a.editor.defineTheme(i,((d=(m=t.componentsExt)==null?void 0:m.WandelscriptEditor)==null?void 0:d.monacoTheme)??{base:t.palette.mode==="dark"?"vs-dark":"vs",inherit:!0,rules:[],colors:{}}),e.monacoSetup&&e.monacoSetup(a),s(i)}return r.jsxRuntimeExports.jsx(u.Suspense,{fallback:r.jsxRuntimeExports.jsx(T.LoadingCover,{}),children:r.jsxRuntimeExports.jsx(E,{value:e.code,onMount:(a,o)=>{g(o)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:n,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});exports.WandelscriptEditor=j;
//# sourceMappingURL=WandelscriptEditor-D6_vS5Uk.cjs.map
