const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./graphqlMode-C04nhQpw.js","./monaco-editor-Bg23C5JD.js","./index-DR3HTfO6.js","./index-BLDnEtdF.css","./mouseTarget-C_NTo-VP.js","./index-C4DNhOLd.js","./index-CWrrTi4L.css","./monaco-editor-C5ZQUaPo.css"])))=>i.map(i=>d[i]);
import{G as c}from"./index-DR3HTfO6.js";import{E as _,l as d}from"./monaco-editor-Bg23C5JD.js";import"./mouseTarget-C_NTo-VP.js";import"./index-C4DNhOLd.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 x(n){return o||(o=u(p,n),d.graphql={api:o},C().then(t=>t.setupMode(o))),o}function C(){return c(()=>import("./graphqlMode-C04nhQpw.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)}export{p as LANGUAGE_ID,x as initializeMode};
