import { createGrammarConfig as o } from "./languages/grammar-config.js";
import { createCompletionParser as t } from "./parser/completion-parser-builder.js";
import { createLangiumParser as i } from "./parser/langium-parser-builder.js";
import { DefaultTokenBuilder as a } from "./parser/token-builder.js";
import { DefaultValueConverter as n } from "./parser/value-converter.js";
import { DefaultLinker as m } from "./references/linker.js";
import { DefaultNameProvider as f } from "./references/name-provider.js";
import { DefaultReferences as u } from "./references/references.js";
import { DefaultScopeComputation as s } from "./references/scope-computation.js";
import { DefaultScopeProvider as c } from "./references/scope-provider.js";
import { DefaultJsonSerializer as p } from "./serializer/json-serializer.js";
import { DefaultServiceRegistry as l } from "./service-registry.js";
import { DefaultDocumentValidator as d } from "./validation/document-validator.js";
import { ValidationRegistry as D } from "./validation/validation-registry.js";
import { DefaultReferenceDescriptionProvider as w, DefaultAstNodeDescriptionProvider as P } from "./workspace/ast-descriptions.js";
import { DefaultAstNodeLocator as v } from "./workspace/ast-node-locator.js";
import { DefaultConfigurationProvider as g } from "./workspace/configuration.js";
import { DefaultDocumentBuilder as L } from "./workspace/document-builder.js";
import { DefaultLangiumDocumentFactory as C, DefaultLangiumDocuments as k } from "./workspace/documents.js";
import { DefaultIndexManager as y } from "./workspace/index-manager.js";
import { DefaultWorkspaceManager as S } from "./workspace/workspace-manager.js";
import { DefaultLexerErrorMessageProvider as M, DefaultLexer as R } from "./parser/lexer.js";
import { JSDocDocumentationProvider as x } from "./documentation/documentation-provider.js";
import { DefaultCommentProvider as A } from "./documentation/comment-provider.js";
import { LangiumParserErrorMessageProvider as N } from "./parser/langium-parser.js";
import { DefaultAsyncParser as V } from "./parser/async-parser.js";
import { DefaultWorkspaceLock as B } from "./workspace/workspace-lock.js";
import { DefaultHydrator as E } from "./serializer/hydrator.js";
function me(r) {
  return {
    documentation: {
      CommentProvider: (e) => new A(e),
      DocumentationProvider: (e) => new x(e)
    },
    parser: {
      AsyncParser: (e) => new V(e),
      GrammarConfig: (e) => o(e),
      LangiumParser: (e) => i(e),
      CompletionParser: (e) => t(e),
      ValueConverter: () => new n(),
      TokenBuilder: () => new a(),
      Lexer: (e) => new R(e),
      ParserErrorMessageProvider: () => new N(),
      LexerErrorMessageProvider: () => new M()
    },
    workspace: {
      AstNodeLocator: () => new v(),
      AstNodeDescriptionProvider: (e) => new P(e),
      ReferenceDescriptionProvider: (e) => new w(e)
    },
    references: {
      Linker: (e) => new m(e),
      NameProvider: () => new f(),
      ScopeProvider: (e) => new c(e),
      ScopeComputation: (e) => new s(e),
      References: (e) => new u(e)
    },
    serializer: {
      Hydrator: (e) => new E(e),
      JsonSerializer: (e) => new p(e)
    },
    validation: {
      DocumentValidator: (e) => new d(e),
      ValidationRegistry: (e) => new D(e)
    },
    shared: () => r.shared
  };
}
function fe(r) {
  return {
    ServiceRegistry: (e) => new l(e),
    workspace: {
      LangiumDocuments: (e) => new k(e),
      LangiumDocumentFactory: (e) => new C(e),
      DocumentBuilder: (e) => new L(e),
      IndexManager: (e) => new y(e),
      WorkspaceManager: (e) => new S(e),
      FileSystemProvider: (e) => r.fileSystemProvider(e),
      WorkspaceLock: () => new B(),
      ConfigurationProvider: (e) => new g(e)
    }
  };
}
export {
  me as createDefaultCoreModule,
  fe as createDefaultSharedCoreModule
};
