const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./graphqlMode-DFtn73_S.js","./preload-helper-2ej06EnG.js","./utils-0fC_yk6r.js","./chunk-BEqpzyXh.js","./editorBaseApi-CbMuPna1.js","./types-tYbtlm7o.js","./editor.api-D1Wr8FLw.js","./mouseTarget-AwEqOa_V.js","./editor-B55U_qvj.css","./monaco-editor-DnXIbKDG.js","./monaco.contribution-DTMPdBm4.js","./monaco-editor-DLLD1ayD.css"])))=>i.map(i=>d[i]);
import{t as e}from"./preload-helper-2ej06EnG.js";import{h as t,n}from"./editor.api-D1Wr8FLw.js";import"./monaco-editor-DnXIbKDG.js";var r=class{_onDidChange=new n;_formattingOptions;_modeConfiguration;_diagnosticSettings;_completionSettings;_schemas=null;_schemasById=Object.create(null);_languageId;_externalFragmentDefinitions;constructor({languageId:e,schemas:t,modeConfiguration:n,formattingOptions:r,diagnosticSettings:i,completionSettings:a}){this._languageId=e,t&&this.setSchemaConfig(t),this._modeConfiguration=n,this._completionSettings=a,this._diagnosticSettings=i,this._formattingOptions=r}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(e){this._schemas=e,this._schemasById=e.reduce((e,t)=>(e[t.uri]=t,e),Object.create(null)),this._onDidChange.fire(this)}setExternalFragmentDefinitions(e){this._externalFragmentDefinitions=e}setModeConfiguration(e){this._modeConfiguration=e,this._onDidChange.fire(this)}setFormattingOptions(e){this._formattingOptions=e,this._onDidChange.fire(this)}setDiagnosticSettings(e){this._diagnosticSettings=e,this._onDidChange.fire(this)}setCompletionSettings(e){this._completionSettings=e,this._onDidChange.fire(this)}};function i(e,t){if(!t)return new r({languageId:e,schemas:[],formattingOptions:o,modeConfiguration:a,diagnosticSettings:s,completionSettings:c});let{schemas:n,formattingOptions:i,modeConfiguration:l,diagnosticSettings:u,completionSettings:d}=t;return new r({languageId:e,schemas:n,formattingOptions:{...o,...i,prettierConfig:{...o.prettierConfig,...i?.prettierConfig}},modeConfiguration:{...a,...l},diagnosticSettings:{...s,...u},completionSettings:{...c,...d}})}var a={documentFormattingEdits:!0,documentRangeFormattingEdits:!1,completionItems:!0,hovers:!0,documentSymbols:!1,tokens:!1,colors:!1,foldingRanges:!1,diagnostics:!0,selectionRanges:!1},o={prettierConfig:{tabWidth:2}},s={jsonDiagnosticSettings:{schemaValidation:`error`}},c={__experimental__fillLeafsOnComplete:!1},l=`graphql`,u;function d(e){return u||(u=i(l,e),t.graphql={api:u},f().then(e=>e.setupMode(u))),u}function f(){return e(()=>import(`./graphqlMode-DFtn73_S.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url)}export{l as LANGUAGE_ID,d as initializeMode};