import { FeatureToggle } from "@open-mercato/core/modules/feature_toggles/data/entities";
const setup = {
  async seedDefaults({ em }) {
    const existing = await em.findOne(FeatureToggle, { identifier: "portal_enabled", deletedAt: null });
    if (existing) return;
    const toggle = em.create(FeatureToggle, {
      identifier: "portal_enabled",
      name: "Portal Enabled",
      description: 'Controls whether the customer portal is accessible. When disabled, all portal routes show "Portal not available".',
      category: "portal",
      type: "boolean",
      defaultValue: true
    });
    em.persist(toggle);
    await em.flush();
  }
};
var setup_default = setup;
export {
  setup_default as default,
  setup
};
//# sourceMappingURL=setup.js.map
