import type { TabConfig } from "../../layouts/TabLayout/types" import { AnalyticsTab } from "../components/tabs/AnalyticsTab" import { DetailsTab } from "../components/tabs/DetailsTab" import { OrderTab } from "../components/tabs/OrderTab" import { OverviewTab } from "../components/tabs/OverviewTab" import { SettingsTab } from "../components/tabs/SettingsTab" /** * Tab registry for this MFE. * * Rules: * - Omit `featureFlag` (and `regions`) to show a tab everywhere. * - Set `featureFlag` to a key of `RegionConfig["features"]` to gate visibility * via the regional feature flag — the tab renders only when the flag is true. * - Use `order` to control left-to-right position (ascending, ties keep declaration order). * - Set `disabled: true` to keep a tab visible but non-interactive. * * The legacy `regions` allowlist is still supported for backwards compatibility but * new tabs should use `featureFlag` instead. * * To inject tabs from the host shell, pass them via TabLayout's `extraTabs` prop * in AppContainer — no changes to this file are needed. */ export const tabs: TabConfig[] = [ { id: "overview", label: "Overview", component: OverviewTab, order: 0, // No `featureFlag` → shown in all regions }, { id: "details", label: "Details", component: DetailsTab, order: 1, featureFlag: "showDetailsTab", // Hidden in UK (GDPR / data-residency constraint) }, { id: "analytics", label: "Analytics", component: AnalyticsTab, order: 2, featureFlag: "showAnalyticsTab", // opt-in per region; currently enabled for US only }, { id: "settings", label: "Settings", component: SettingsTab, order: 3, // No `featureFlag` → shown in all regions }, { id: "order", label: "Order", component: OrderTab, order: 4, featureFlag: "enableOrderForm", }, ]