const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/graphqlMode-BIse83Ym.js","assets/monaco-editor-BIyG1nb2.js","assets/index-DiQX2EYw.js","assets/index-D-7B2OXV.css","assets/mouseTarget-Cn-UJLQv.js","assets/monaco-editor-xnhJeWAr.css"])))=>i.map(i=>d[i]);
import{_ as c}from"./index-DiQX2EYw.js";import{E as _,l as d}from"./monaco-editor-BIyG1nb2.js";import"./mouseTarget-Cn-UJLQv.js";class m{_onDidChange=new _;_formattingOptions;_modeConfiguration;_diagnosticSettings;_completionSettings;_schemas=null;_schemasById=Object.create(null);_languageId;_externalFragmentDefinitions;constructor({languageId:t,schemas:i,modeConfiguration:e,formattingOptions:s,diagnosticSettings:a,completionSettings:r}){this._languageId=t,i&&this.setSchemaConfig(i),this._modeConfiguration=e,this._completionSettings=r,this._diagnosticSettings=a,this._formattingOptions=s}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get schemas(){return this._schemas}schemasById(){return this._schemasById}get formattingOptions(){return this._formattingOptions}get diagnosticSettings(){return this._diagnosticSettings}get completionSettings(){return{...this._completionSettings,fillLeafsOnComplete:this._completionSettings.__experimental__fillLeafsOnComplete??this._completionSettings.fillLeafsOnComplete}}get externalFragmentDefinitions(){return this._externalFragmentDefinitions}setSchemaConfig(t){this._schemas=t,this._schemasById=t.reduce((i,e)=>(i[e.uri]=e,i),Object.create(null)),this._onDidChange.fire(this)}setExternalFragmentDefinitions(t){this._externalFragmentDefinitions=t}setModeConfiguration(t){this._modeConfiguration=t,this._onDidChange.fire(this)}setFormattingOptions(t){this._formattingOptions=t,this._onDidChange.fire(this)}setDiagnosticSettings(t){this._diagnosticSettings=t,this._onDidChange.fire(this)}setCompletionSettings(t){this._completionSettings=t,this._onDidChange.fire(this)}}function u(n,t){if(!t)return new m({languageId:n,schemas:[],formattingOptions:g,modeConfiguration:l,diagnosticSettings:f,completionSettings:h});const{schemas:i,formattingOptions:e,modeConfiguration:s,diagnosticSettings:a,completionSettings:r}=t;return new m({languageId:n,schemas:i,formattingOptions:{...g,...e,prettierConfig:{...g.prettierConfig,...e?.prettierConfig}},modeConfiguration:{...l,...s},diagnosticSettings:{...f,...a},completionSettings:{...h,...r}})}const l={documentFormattingEdits:!0,documentRangeFormattingEdits:!1,completionItems:!0,hovers:!0,documentSymbols:!1,tokens:!1,colors:!1,foldingRanges:!1,diagnostics:!0,selectionRanges:!1},g={prettierConfig:{tabWidth:2}},f={jsonDiagnosticSettings:{schemaValidation:"error"}},h={__experimental__fillLeafsOnComplete:!1},p="graphql";let o;function I(n){return o||(o=u(p,n),d.graphql={api:o},C().then(t=>t.setupMode(o))),o}function C(){return c(()=>import("./graphqlMode-BIse83Ym.js"),__vite__mapDeps([0,1,2,3,4,5]))}export{p as LANGUAGE_ID,I as initializeMode};
