var _a, _b;
import { AbstractMermaidTokenBuilder, __name, AbstractMermaidValueConverter, MermaidGeneratedSharedModule, PieGeneratedModule } from "./dist-chunks-mermaid-parser.core-chunk-4KMFLZZN.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 PieTokenBuilder = (_a = class extends AbstractMermaidTokenBuilder {
  constructor() {
    super(["pie", "showData"]);
  }
}, __name(_a, "PieTokenBuilder"), _a);
var PieValueConverter = (_b = class extends AbstractMermaidValueConverter {
  runCustomConverter(rule, input, _cstNode) {
    if (rule.name !== "PIE_SECTION_LABEL") {
      return void 0;
    }
    return input.replace(/"/g, "").trim();
  }
}, __name(_b, "PieValueConverter"), _b);
var PieModule = {
  parser: {
    TokenBuilder: /* @__PURE__ */ __name(() => new PieTokenBuilder(), "TokenBuilder"),
    ValueConverter: /* @__PURE__ */ __name(() => new PieValueConverter(), "ValueConverter")
  }
};
function createPieServices(context = EmptyFileSystem) {
  const shared = inject(
    createDefaultSharedCoreModule(context),
    MermaidGeneratedSharedModule
  );
  const Pie = inject(
    createDefaultCoreModule({ shared }),
    PieGeneratedModule,
    PieModule
  );
  shared.ServiceRegistry.register(Pie);
  return { shared, Pie };
}
__name(createPieServices, "createPieServices");
export {
  PieModule,
  createPieServices
};
//# sourceMappingURL=dist-chunks-mermaid-parser.core-chunk-WFWHJNB7.js.map
