"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const grammarConfig = require("./lib-languages-grammar-config.cjs");
const completionParserBuilder = require("./lib-parser-completion-parser-builder.cjs");
const langiumParserBuilder = require("./lib-parser-langium-parser-builder.cjs");
const tokenBuilder = require("./lib-parser-token-builder.cjs");
const valueConverter = require("./lib-parser-value-converter.cjs");
const linker = require("./lib-references-linker.cjs");
const nameProvider = require("./lib-references-name-provider.cjs");
const references = require("./lib-references-references.cjs");
const scopeComputation = require("./lib-references-scope-computation.cjs");
const scopeProvider = require("./lib-references-scope-provider.cjs");
const jsonSerializer = require("./lib-serializer-json-serializer.cjs");
const serviceRegistry = require("./lib-service-registry.cjs");
const documentValidator = require("./lib-validation-document-validator.cjs");
const validationRegistry = require("./lib-validation-validation-registry.cjs");
const astDescriptions = require("./lib-workspace-ast-descriptions.cjs");
const astNodeLocator = require("./lib-workspace-ast-node-locator.cjs");
const configuration = require("./lib-workspace-configuration.cjs");
const documentBuilder = require("./lib-workspace-document-builder.cjs");
const documents = require("./lib-workspace-documents.cjs");
const indexManager = require("./lib-workspace-index-manager.cjs");
const workspaceManager = require("./lib-workspace-workspace-manager.cjs");
const lexer = require("./lib-parser-lexer.cjs");
const documentationProvider = require("./lib-documentation-documentation-provider.cjs");
const commentProvider = require("./lib-documentation-comment-provider.cjs");
const langiumParser = require("./lib-parser-langium-parser.cjs");
const asyncParser = require("./lib-parser-async-parser.cjs");
const workspaceLock = require("./lib-workspace-workspace-lock.cjs");
const hydrator = require("./lib-serializer-hydrator.cjs");
function createDefaultCoreModule(context) {
  return {
    documentation: {
      CommentProvider: (services) => new commentProvider.DefaultCommentProvider(services),
      DocumentationProvider: (services) => new documentationProvider.JSDocDocumentationProvider(services)
    },
    parser: {
      AsyncParser: (services) => new asyncParser.DefaultAsyncParser(services),
      GrammarConfig: (services) => grammarConfig.createGrammarConfig(services),
      LangiumParser: (services) => langiumParserBuilder.createLangiumParser(services),
      CompletionParser: (services) => completionParserBuilder.createCompletionParser(services),
      ValueConverter: () => new valueConverter.DefaultValueConverter(),
      TokenBuilder: () => new tokenBuilder.DefaultTokenBuilder(),
      Lexer: (services) => new lexer.DefaultLexer(services),
      ParserErrorMessageProvider: () => new langiumParser.LangiumParserErrorMessageProvider(),
      LexerErrorMessageProvider: () => new lexer.DefaultLexerErrorMessageProvider()
    },
    workspace: {
      AstNodeLocator: () => new astNodeLocator.DefaultAstNodeLocator(),
      AstNodeDescriptionProvider: (services) => new astDescriptions.DefaultAstNodeDescriptionProvider(services),
      ReferenceDescriptionProvider: (services) => new astDescriptions.DefaultReferenceDescriptionProvider(services)
    },
    references: {
      Linker: (services) => new linker.DefaultLinker(services),
      NameProvider: () => new nameProvider.DefaultNameProvider(),
      ScopeProvider: (services) => new scopeProvider.DefaultScopeProvider(services),
      ScopeComputation: (services) => new scopeComputation.DefaultScopeComputation(services),
      References: (services) => new references.DefaultReferences(services)
    },
    serializer: {
      Hydrator: (services) => new hydrator.DefaultHydrator(services),
      JsonSerializer: (services) => new jsonSerializer.DefaultJsonSerializer(services)
    },
    validation: {
      DocumentValidator: (services) => new documentValidator.DefaultDocumentValidator(services),
      ValidationRegistry: (services) => new validationRegistry.ValidationRegistry(services)
    },
    shared: () => context.shared
  };
}
function createDefaultSharedCoreModule(context) {
  return {
    ServiceRegistry: (services) => new serviceRegistry.DefaultServiceRegistry(services),
    workspace: {
      LangiumDocuments: (services) => new documents.DefaultLangiumDocuments(services),
      LangiumDocumentFactory: (services) => new documents.DefaultLangiumDocumentFactory(services),
      DocumentBuilder: (services) => new documentBuilder.DefaultDocumentBuilder(services),
      IndexManager: (services) => new indexManager.DefaultIndexManager(services),
      WorkspaceManager: (services) => new workspaceManager.DefaultWorkspaceManager(services),
      FileSystemProvider: (services) => context.fileSystemProvider(services),
      WorkspaceLock: () => new workspaceLock.DefaultWorkspaceLock(),
      ConfigurationProvider: (services) => new configuration.DefaultConfigurationProvider(services)
    }
  };
}
exports.createDefaultCoreModule = createDefaultCoreModule;
exports.createDefaultSharedCoreModule = createDefaultSharedCoreModule;
//# sourceMappingURL=lib-default-module.cjs.map
