'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/pie/tokenBuilder.ts
var PieTokenBuilder = class extends chunkFPAJGGOC.AbstractMermaidTokenBuilder {
  static {
    chunkFPAJGGOC.__name(this, "PieTokenBuilder");
  }
  constructor() {
    super(["pie", "showData"]);
  }
};

// src/language/pie/valueConverter.ts
var PieValueConverter = class extends chunkFPAJGGOC.AbstractMermaidValueConverter {
  static {
    chunkFPAJGGOC.__name(this, "PieValueConverter");
  }
  runCustomConverter(rule, input, _cstNode) {
    if (rule.name !== "PIE_SECTION_LABEL") {
      return void 0;
    }
    return input.replace(/"/g, "").trim();
  }
};

// src/language/pie/module.ts
var PieModule = {
  parser: {
    TokenBuilder: /* @__PURE__ */ chunkFPAJGGOC.__name(() => new PieTokenBuilder(), "TokenBuilder"),
    ValueConverter: /* @__PURE__ */ chunkFPAJGGOC.__name(() => new PieValueConverter(), "ValueConverter")
  }
};
function createPieServices(context = fileSystemProvider.EmptyFileSystem) {
  const shared = dependencyInjection.inject(
    defaultModule.createDefaultSharedCoreModule(context),
    chunkFPAJGGOC.MermaidGeneratedSharedModule
  );
  const Pie = dependencyInjection.inject(
    defaultModule.createDefaultCoreModule({ shared }),
    chunkFPAJGGOC.PieGeneratedModule,
    PieModule
  );
  shared.ServiceRegistry.register(Pie);
  return { shared, Pie };
}
chunkFPAJGGOC.__name(createPieServices, "createPieServices");

exports.PieModule = PieModule;
exports.createPieServices = createPieServices;
