/**
 * Feature flags. `NEXT_PUBLIC_` so middleware, server and client agree.
 * Set to "false" to hide a module without a deploy rollback.
 */
export const FEATURES = {
  participantPlatform:
    process.env.NEXT_PUBLIC_FEATURE_PARTICIPANT_PLATFORM !== "false",
  domesticFeed: process.env.NEXT_PUBLIC_FEATURE_DOMESTIC_FEED !== "false",
} as const;

export type FeatureKey = keyof typeof FEATURES;

export function isFeatureEnabled(key: FeatureKey): boolean {
  return FEATURES[key];
}
