'use strict';

var chunkFPAJGGOC = require('./chunk-FPAJGGOC.js');
var fileSystemProvider = require('../../../../../../../langium@3.3.1/node_modules/langium/lib/workspace/file-system-provider.js');
var dependencyInjection = require('../../../../../../../langium@3.3.1/node_modules/langium/lib/dependency-injection.js');
var defaultModule = require('../../../../../../../langium@3.3.1/node_modules/langium/lib/default-module.js');

// src/language/architecture/tokenBuilder.ts
var ArchitectureTokenBuilder = class extends chunkFPAJGGOC.AbstractMermaidTokenBuilder {
  static {
    chunkFPAJGGOC.__name(this, "ArchitectureTokenBuilder");
  }
  constructor() {
    super(["architecture"]);
  }
};

// src/language/architecture/valueConverter.ts
var ArchitectureValueConverter = class extends chunkFPAJGGOC.AbstractMermaidValueConverter {
  static {
    chunkFPAJGGOC.__name(this, "ArchitectureValueConverter");
  }
  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;
  }
};

// src/language/architecture/module.ts
var ArchitectureModule = {
  parser: {
    TokenBuilder: /* @__PURE__ */ chunkFPAJGGOC.__name(() => new ArchitectureTokenBuilder(), "TokenBuilder"),
    ValueConverter: /* @__PURE__ */ chunkFPAJGGOC.__name(() => new ArchitectureValueConverter(), "ValueConverter")
  }
};
function createArchitectureServices(context = fileSystemProvider.EmptyFileSystem) {
  const shared = dependencyInjection.inject(
    defaultModule.createDefaultSharedCoreModule(context),
    chunkFPAJGGOC.MermaidGeneratedSharedModule
  );
  const Architecture = dependencyInjection.inject(
    defaultModule.createDefaultCoreModule({ shared }),
    chunkFPAJGGOC.ArchitectureGeneratedModule,
    ArchitectureModule
  );
  shared.ServiceRegistry.register(Architecture);
  return { shared, Architecture };
}
chunkFPAJGGOC.__name(createArchitectureServices, "createArchitectureServices");

exports.ArchitectureModule = ArchitectureModule;
exports.createArchitectureServices = createArchitectureServices;
