import { createDefaultCoreModule as e, createDefaultSharedCoreModule as t } from "../../../../../langium/lib/default-module.js";
import { inject as n } from "../../../../../langium/lib/dependency-injection.js";
import { EmptyFileSystem as r } from "../../../../../langium/lib/workspace/file-system-provider.js";
import { AbstractMermaidTokenBuilder as i, AbstractMermaidValueConverter as a, ArchitectureGrammarGeneratedModule as o, MermaidGeneratedSharedModule as s, __name as c } from "./chunk-K5T4RW27.js";
//#region ../../node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-7N4EOEYR.mjs
var l = class extends i {
	static {
		c(this, "ArchitectureTokenBuilder");
	}
	constructor() {
		super(["architecture"]);
	}
}, u = class extends a {
	static {
		c(this, "ArchitectureValueConverter");
	}
	runCustomConverter(e, t, n) {
		if (e.name === "ARCH_ICON") return t.replace(/[()]/g, "").trim();
		if (e.name === "ARCH_TEXT_ICON") return t.replace(/["()]/g, "");
		if (e.name === "ARCH_TITLE") {
			let e = t.replace(/^\[|]$/g, "").trim();
			return (e.startsWith("\"") && e.endsWith("\"") || e.startsWith("'") && e.endsWith("'")) && (e = e.slice(1, -1), e = e.replace(/\\"/g, "\"").replace(/\\'/g, "'")), e.trim();
		}
	}
}, d = { parser: {
	TokenBuilder: /* @__PURE__ */ c(() => new l(), "TokenBuilder"),
	ValueConverter: /* @__PURE__ */ c(() => new u(), "ValueConverter")
} };
function f(i = r) {
	let a = n(t(i), s), c = n(e({ shared: a }), o, d);
	return a.ServiceRegistry.register(c), {
		shared: a,
		Architecture: c
	};
}
c(f, "createArchitectureServices");
//#endregion
export { d as ArchitectureModule, f as createArchitectureServices };
