import { PricingPlanType } from "../types"; const FREE_FEATURES = { SYNC: "SYNC", BASIC_SUPPORT: "BASIC_SUPPORT", LIMITED_STORAGE: "LIMITED_STORAGE", EMAIL_NOTIFICATIONS: "EMAIL_NOTIFICATIONS", BASIC_REPORTS: "BASIC_REPORTS", } as const; const PREMIUM_FEATURES = { ...FREE_FEATURES, ADVANCED_SYNC: "ADVANCED_SYNC", PRIORITY_SUPPORT: "PRIORITY_SUPPORT", MORE_STORAGE: "MORE_STORAGE", TEAM_COLLABORATION: "TEAM_COLLABORATION", SMS_NOTIFICATIONS: "SMS_NOTIFICATIONS", ADVANCED_REPORTS: "ADVANCED_REPORTS", } as const; const ENTERPRISE_FEATURES = { ...PREMIUM_FEATURES, UNLIMITED_STORAGE: "UNLIMITED_STORAGE", CUSTOM_BRANDING: "CUSTOM_BRANDING", DEDICATED_SUPPORT: "DEDICATED_SUPPORT", API_ACCESS: "API_ACCESS", USER_ROLES: "USER_ROLES", AUDIT_LOGS: "AUDIT_LOGS", SINGLE_SIGN_ON: "SINGLE_SIGN_ON", ADVANCED_ANALYTICS: "ADVANCED_ANALYTICS", } as const; export const FEATURES = { [PricingPlanType.FREE]: FREE_FEATURES, [PricingPlanType.PREMIUM]: PREMIUM_FEATURES, [PricingPlanType.ENTERPRISE]: ENTERPRISE_FEATURES, } as const; export type FreeFeature = (typeof FREE_FEATURES)[keyof typeof FREE_FEATURES]; export type PremiumFeature = (typeof PREMIUM_FEATURES)[keyof typeof PREMIUM_FEATURES]; export type EnterpriseFeature = (typeof ENTERPRISE_FEATURES)[keyof typeof ENTERPRISE_FEATURES]; export type Feature = FreeFeature | PremiumFeature | EnterpriseFeature;