var _a, _b;
import { AbstractMermaidTokenBuilder, __name, AbstractMermaidValueConverter, MermaidGeneratedSharedModule, ArchitectureGeneratedModule } from "./dist-chunks-mermaid-parser.core-chunk-FPAJGGOC.js";
import { EmptyFileSystem } from "../../langium/lib-workspace-file-system-provider.js";
import { inject } from "../../langium/lib-dependency-injection.js";
import { createDefaultSharedCoreModule, createDefaultCoreModule } from "../../langium/lib-default-module.js";
var ArchitectureTokenBuilder = (_a = class extends AbstractMermaidTokenBuilder {
  constructor() {
    super(["architecture"]);
  }
}, __name(_a, "ArchitectureTokenBuilder"), _a);
var ArchitectureValueConverter = (_b = class extends AbstractMermaidValueConverter {
  runCustomConverter(rule, input, _cstNode) {
    if (rule.name === "ARCH_ICON") {
      return input.replace(/[()]/g, "").trim();
    } else if (rule.name === "ARCH_TEXT_ICON") {
      return input.replace(/["()]/g, "");
    } else if (rule.name === "ARCH_TITLE") {
      return input.replace(/[[\]]/g, "").trim();
    }
    return void 0;
  }
}, __name(_b, "ArchitectureValueConverter"), _b);
var ArchitectureModule = {
  parser: {
    TokenBuilder: /* @__PURE__ */ __name(() => new ArchitectureTokenBuilder(), "TokenBuilder"),
    ValueConverter: /* @__PURE__ */ __name(() => new ArchitectureValueConverter(), "ValueConverter")
  }
};
function createArchitectureServices(context = EmptyFileSystem) {
  const shared = inject(
    createDefaultSharedCoreModule(context),
    MermaidGeneratedSharedModule
  );
  const Architecture = inject(
    createDefaultCoreModule({ shared }),
    ArchitectureGeneratedModule,
    ArchitectureModule
  );
  shared.ServiceRegistry.register(Architecture);
  return { shared, Architecture };
}
__name(createArchitectureServices, "createArchitectureServices");
export {
  ArchitectureModule,
  createArchitectureServices
};
//# sourceMappingURL=dist-chunks-mermaid-parser.core-chunk-O7ZBX7Z2.js.map
