"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PLAN_SCOPED_FEATURE_KEYS = exports.FEATURE_KEYS = exports.FEATURE_CATALOG = exports.FeatureKey = void 0;
const client_1 = require("@prisma/client");
var FeatureKey;
(function (FeatureKey) {
    FeatureKey["PLATFORM_DASHBOARD"] = "PLATFORM_DASHBOARD";
    FeatureKey["ESTATE_SIGNUPS_VIEW"] = "ESTATE_SIGNUPS_VIEW";
    FeatureKey["ESTATE_SIGNUPS_REVIEW"] = "ESTATE_SIGNUPS_REVIEW";
    FeatureKey["SALES_PARTNER_PROFILE_VIEW"] = "SALES_PARTNER_PROFILE_VIEW";
    FeatureKey["SALES_PARTNER_EARNINGS_VIEW"] = "SALES_PARTNER_EARNINGS_VIEW";
    FeatureKey["SALES_PARTNER_ADMIN_CONTACT"] = "SALES_PARTNER_ADMIN_CONTACT";
    FeatureKey["PAYMENTS_VIEW"] = "PAYMENTS_VIEW";
    FeatureKey["PAYMENTS_CONFIRM"] = "PAYMENTS_CONFIRM";
    FeatureKey["SUBSCRIPTION_PLANS_VIEW"] = "SUBSCRIPTION_PLANS_VIEW";
    FeatureKey["SUBSCRIPTION_PLANS_MANAGE"] = "SUBSCRIPTION_PLANS_MANAGE";
    FeatureKey["PAYMENT_PROVIDERS_VIEW"] = "PAYMENT_PROVIDERS_VIEW";
    FeatureKey["PAYMENT_PROVIDERS_MANAGE"] = "PAYMENT_PROVIDERS_MANAGE";
    FeatureKey["OTP_PROVIDERS_MANAGE"] = "OTP_PROVIDERS_MANAGE";
    FeatureKey["INTEGRATIONS_MANAGE"] = "INTEGRATIONS_MANAGE";
    FeatureKey["USERS_VIEW"] = "USERS_VIEW";
    FeatureKey["USERS_MANAGE"] = "USERS_MANAGE";
    FeatureKey["ESTATES_VIEW"] = "ESTATES_VIEW";
    FeatureKey["ESTATES_MANAGE"] = "ESTATES_MANAGE";
    FeatureKey["RESIDENTS_VIEW"] = "RESIDENTS_VIEW";
    FeatureKey["RESIDENTS_MANAGE"] = "RESIDENTS_MANAGE";
    FeatureKey["GUARDS_VIEW"] = "GUARDS_VIEW";
    FeatureKey["GUARDS_MANAGE"] = "GUARDS_MANAGE";
    FeatureKey["VISITORS_VIEW"] = "VISITORS_VIEW";
    FeatureKey["VISITORS_CREATE"] = "VISITORS_CREATE";
    FeatureKey["VISITORS_MANAGE"] = "VISITORS_MANAGE";
    FeatureKey["VISITOR_PASSES_VIEW"] = "VISITOR_PASSES_VIEW";
    FeatureKey["VISITOR_PASSES_CREATE"] = "VISITOR_PASSES_CREATE";
    FeatureKey["VISITOR_PASSES_REVOKE"] = "VISITOR_PASSES_REVOKE";
    FeatureKey["CHECKIN_SCAN"] = "CHECKIN_SCAN";
    FeatureKey["CHECKIN_MANUAL"] = "CHECKIN_MANUAL";
    FeatureKey["CHECKOUT"] = "CHECKOUT";
    FeatureKey["VISIT_SESSIONS_VIEW"] = "VISIT_SESSIONS_VIEW";
    FeatureKey["INCIDENTS_VIEW"] = "INCIDENTS_VIEW";
    FeatureKey["INCIDENTS_MANAGE"] = "INCIDENTS_MANAGE";
    FeatureKey["OFFLINE_BOOTSTRAP"] = "OFFLINE_BOOTSTRAP";
    FeatureKey["OFFLINE_SYNC"] = "OFFLINE_SYNC";
    FeatureKey["NOTIFICATIONS_SEND"] = "NOTIFICATIONS_SEND";
    FeatureKey["PROFILE_VIEW"] = "PROFILE_VIEW";
    FeatureKey["PROFILE_MANAGE"] = "PROFILE_MANAGE";
    FeatureKey["PLAN_COMPARISON_VIEW"] = "PLAN_COMPARISON_VIEW";
    FeatureKey["REQUESTS_CREATE"] = "REQUESTS_CREATE";
    FeatureKey["REQUESTS_VIEW"] = "REQUESTS_VIEW";
    FeatureKey["REQUESTS_RESPOND"] = "REQUESTS_RESPOND";
    FeatureKey["REQUESTS_MANAGE"] = "REQUESTS_MANAGE";
    FeatureKey["ANNOUNCEMENTS_VIEW"] = "ANNOUNCEMENTS_VIEW";
    FeatureKey["ANNOUNCEMENTS_SEND"] = "ANNOUNCEMENTS_SEND";
    FeatureKey["ANNOUNCEMENTS_EMERGENCY_SEND"] = "ANNOUNCEMENTS_EMERGENCY_SEND";
    FeatureKey["GATES_VIEW"] = "GATES_VIEW";
    FeatureKey["GATES_MANAGE"] = "GATES_MANAGE";
    FeatureKey["GUARD_SHIFT_MANAGE"] = "GUARD_SHIFT_MANAGE";
    FeatureKey["SERVICE_CHARGE_PAYMENTS"] = "SERVICE_CHARGE_PAYMENTS";
    FeatureKey["ESTATE_NEWS_VIEW"] = "ESTATE_NEWS_VIEW";
    FeatureKey["ESTATE_NEWS_MANAGE"] = "ESTATE_NEWS_MANAGE";
    FeatureKey["EXPORT_REPORTS"] = "EXPORT_REPORTS";
    FeatureKey["IMPORT_RESIDENTS"] = "IMPORT_RESIDENTS";
    FeatureKey["VISITOR_INTELLIGENCE_VIEW"] = "VISITOR_INTELLIGENCE_VIEW";
    FeatureKey["VISITOR_INTELLIGENCE_MANAGE"] = "VISITOR_INTELLIGENCE_MANAGE";
    FeatureKey["VISITOR_RISK_SCORING"] = "VISITOR_RISK_SCORING";
    FeatureKey["ANALYTICS_VIEW"] = "ANALYTICS_VIEW";
    FeatureKey["WHITE_LABEL_BRANDING"] = "WHITE_LABEL_BRANDING";
    FeatureKey["API_ACCESS"] = "API_ACCESS";
    FeatureKey["SMART_GATE_INTEGRATIONS"] = "SMART_GATE_INTEGRATIONS";
    FeatureKey["FEATURE_SETTINGS_MANAGE"] = "FEATURE_SETTINGS_MANAGE";
})(FeatureKey || (exports.FeatureKey = FeatureKey = {}));
exports.FEATURE_CATALOG = [
    {
        key: FeatureKey.PLATFORM_DASHBOARD,
        label: 'Platform dashboard',
        description: 'View platform-wide counts, recent audit logs, and pending signups. Payment activity requires payment view access.',
        category: 'Platform',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.SALES_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.ESTATE_SIGNUPS_VIEW,
        label: 'Estate signup pipeline',
        description: 'View estate-admin leads and onboarding status.',
        category: 'Sales',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.SALES_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.ESTATE_SIGNUPS_REVIEW,
        label: 'Review estate signups',
        description: 'Approve, reject, or suspend estate-admin signup leads.',
        category: 'Sales',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.SALES_PARTNER_PROFILE_VIEW,
        label: 'View partner profile',
        description: 'View sales-admin partner status, assigned estates, and whether earnings are active.',
        category: 'Sales',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.SALES_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.SALES_PARTNER_EARNINGS_VIEW,
        label: 'View partner earnings',
        description: 'View commission percentage and estimated earnings for assigned estates.',
        category: 'Sales',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.SALES_PARTNER_ADMIN_CONTACT,
        label: 'Contact assigned estate admins',
        description: 'Message estate admins for assigned estates about payment, onboarding, or support issues.',
        category: 'Sales',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.PAYMENTS_VIEW,
        label: 'View payment records',
        description: 'View estate payment counts, payment records, and payment-related audit activity.',
        category: 'Billing',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.PAYMENTS_CONFIRM,
        label: 'Confirm estate payments',
        description: 'Verify payment references and activate paid estates.',
        category: 'Billing',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.SUBSCRIPTION_PLANS_VIEW,
        label: 'View subscription plans',
        description: 'View plan definitions, resident ranges, and pricing.',
        category: 'Billing',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.SALES_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.SUBSCRIPTION_PLANS_MANAGE,
        label: 'Manage subscription plans',
        description: 'Update plan pricing, resident ranges, and availability.',
        category: 'Billing',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.PAYMENT_PROVIDERS_VIEW,
        label: 'View payment providers',
        description: 'View global and estate-specific payment provider availability.',
        category: 'Billing',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.PAYMENT_PROVIDERS_MANAGE,
        label: 'Manage payment providers',
        description: 'Enable or disable payment gateways globally or for an estate.',
        category: 'Billing',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.OTP_PROVIDERS_MANAGE,
        label: 'Manage OTP providers',
        description: 'Update OTP provider priority, failover, and SMS credentials.',
        category: 'Security',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.INTEGRATIONS_MANAGE,
        label: 'Manage third-party integrations',
        description: 'Update payment, SMS, email, and custom third-party API keys.',
        category: 'Integrations',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.USERS_VIEW,
        label: 'View users',
        description: 'View user accounts across the platform or within an estate.',
        category: 'Administration',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.SALES_ADMIN, client_1.UserRole.ESTATE_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.USERS_MANAGE,
        label: 'Manage estate users',
        description: 'Update account status, phone, estate assignment, and display name within the allowed estate scope.',
        category: 'Administration',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.ESTATE_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.ESTATES_VIEW,
        label: 'View estates',
        description: 'View estates and estate profile data.',
        category: 'Administration',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.SALES_ADMIN, client_1.UserRole.ESTATE_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.ESTATES_MANAGE,
        label: 'Manage estates',
        description: 'Create or update estate settings, profile details, and branding.',
        category: 'Administration',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.SALES_ADMIN],
        estateConfigurable: false
    },
    {
        key: FeatureKey.RESIDENTS_VIEW,
        label: 'View residents',
        description: 'List and search residents in an estate.',
        category: 'Estate Operations',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.SALES_ADMIN, client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.RESIDENT],
        estateConfigurable: true
    },
    {
        key: FeatureKey.RESIDENTS_MANAGE,
        label: 'Manage residents',
        description: 'Create or update resident accounts and profiles.',
        category: 'Estate Operations',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR],
        estateConfigurable: true
    },
    {
        key: FeatureKey.GUARDS_VIEW,
        label: 'View guards',
        description: 'List guard accounts and device assignments.',
        category: 'Estate Operations',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.SALES_ADMIN, client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR],
        estateConfigurable: true
    },
    {
        key: FeatureKey.GUARDS_MANAGE,
        label: 'Manage guards',
        description: 'Create or update guard accounts and device assignment.',
        category: 'Estate Operations',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR],
        estateConfigurable: true
    },
    {
        key: FeatureKey.VISITORS_VIEW,
        label: 'View visitors',
        description: 'List visitor records in an estate with plan-scoped visibility.',
        category: 'Visitors',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.SALES_ADMIN, client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.GUARD, client_1.UserRole.RESIDENT],
        estateConfigurable: true
    },
    {
        key: FeatureKey.PROFILE_VIEW,
        label: 'View own profile',
        description: 'View profile completion, resident or guard profile details, and current estate plan.',
        category: 'Profiles',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.GUARD, client_1.UserRole.RESIDENT],
        estateConfigurable: true
    },
    {
        key: FeatureKey.PROFILE_MANAGE,
        label: 'Manage own profile',
        description: 'Update first name, last name, profile image references, address, email, block, flat, and confirmation.',
        category: 'Profiles',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.GUARD, client_1.UserRole.RESIDENT],
        estateConfigurable: true
    },
    {
        key: FeatureKey.PLAN_COMPARISON_VIEW,
        label: 'View estate plan comparison',
        description: 'Show residents their current estate plan and higher-plan benefits without exposing prices.',
        category: 'Plans',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.GUARD, client_1.UserRole.RESIDENT],
        estateConfigurable: true
    },
    {
        key: FeatureKey.VISITORS_CREATE,
        label: 'Create visitors',
        description: 'Create visitor profiles before issuing passes.',
        category: 'Visitors',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.RESIDENT],
        estateConfigurable: true
    },
    {
        key: FeatureKey.VISITORS_MANAGE,
        label: 'Manage visitors',
        description: 'Update visitor identity, vehicle, photo, or estate assignment.',
        category: 'Visitors',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.ESTATE_ADMIN],
        estateConfigurable: true
    },
    {
        key: FeatureKey.VISITOR_PASSES_VIEW,
        label: 'View visitor passes',
        description: 'List visitor passes with visitor and host resident context.',
        category: 'Visitors',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.SALES_ADMIN, client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.GUARD, client_1.UserRole.RESIDENT],
        estateConfigurable: true
    },
    {
        key: FeatureKey.VISITOR_PASSES_CREATE,
        label: 'Create visitor passes',
        description: 'Create QR/manual visitor passes for approved visitors.',
        category: 'Visitors',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.RESIDENT],
        estateConfigurable: true
    },
    {
        key: FeatureKey.VISITOR_PASSES_REVOKE,
        label: 'Revoke visitor passes',
        description: 'Revoke active visitor passes before expiry.',
        category: 'Visitors',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR],
        estateConfigurable: true
    },
    {
        key: FeatureKey.CHECKIN_SCAN,
        label: 'QR check-in',
        description: 'Check in visitors by scanning QR tokens at the gate.',
        category: 'Gate Operations',
        defaultRoles: [client_1.UserRole.GUARD],
        estateConfigurable: true
    },
    {
        key: FeatureKey.CHECKIN_MANUAL,
        label: 'Manual check-in',
        description: 'Check in visitors with manual visitor codes.',
        category: 'Gate Operations',
        defaultRoles: [client_1.UserRole.GUARD],
        estateConfigurable: true
    },
    {
        key: FeatureKey.CHECKOUT,
        label: 'Visitor checkout',
        description: 'Check out active visit sessions.',
        category: 'Gate Operations',
        defaultRoles: [client_1.UserRole.GUARD],
        estateConfigurable: true
    },
    {
        key: FeatureKey.VISIT_SESSIONS_VIEW,
        label: 'View visit sessions',
        description: 'Review active and completed gate visit sessions.',
        category: 'Gate Operations',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.SALES_ADMIN, client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR],
        estateConfigurable: true
    },
    {
        key: FeatureKey.INCIDENTS_VIEW,
        label: 'View incidents',
        description: 'List incident reports in an estate.',
        category: 'Security',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.SALES_ADMIN, client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.GUARD],
        estateConfigurable: true
    },
    {
        key: FeatureKey.INCIDENTS_MANAGE,
        label: 'Manage incidents',
        description: 'Create or update incident reports.',
        category: 'Security',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.GUARD],
        estateConfigurable: true
    },
    {
        key: FeatureKey.OFFLINE_BOOTSTRAP,
        label: 'Offline bootstrap',
        description: 'Download offline gate operation data.',
        category: 'Gate Operations',
        defaultRoles: [client_1.UserRole.GUARD, client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR],
        estateConfigurable: true
    },
    {
        key: FeatureKey.OFFLINE_SYNC,
        label: 'Offline sync',
        description: 'Submit offline event batches from gate devices.',
        category: 'Gate Operations',
        defaultRoles: [client_1.UserRole.GUARD, client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR],
        estateConfigurable: true
    },
    {
        key: FeatureKey.REQUESTS_CREATE,
        label: 'Create resident requests',
        description: 'Create resident security, infrastructure, estate services, and support requests.',
        category: 'Resident Requests',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.RESIDENT],
        estateConfigurable: true
    },
    {
        key: FeatureKey.REQUESTS_VIEW,
        label: 'View resident requests',
        description: 'View resident requests and complaint history in the estate.',
        category: 'Resident Requests',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.GUARD, client_1.UserRole.RESIDENT],
        estateConfigurable: true
    },
    {
        key: FeatureKey.REQUESTS_RESPOND,
        label: 'Respond to resident requests',
        description: 'Add responses to resident requests and keep residents updated.',
        category: 'Resident Requests',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.GUARD],
        estateConfigurable: true
    },
    {
        key: FeatureKey.REQUESTS_MANAGE,
        label: 'Manage resident requests',
        description: 'Assign, resolve, close, and prioritize resident requests.',
        category: 'Resident Requests',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR],
        estateConfigurable: true
    },
    {
        key: FeatureKey.ANNOUNCEMENTS_VIEW,
        label: 'View announcements',
        description: 'Read estate news, maintenance notices, security updates, service charge reminders, and emergency alerts.',
        category: 'Communications',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.GUARD, client_1.UserRole.RESIDENT],
        estateConfigurable: true
    },
    {
        key: FeatureKey.ANNOUNCEMENTS_SEND,
        label: 'Send announcements',
        description: 'Send plan-limited estate communications through in-app, push, email, and SMS channels.',
        category: 'Communications',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.GUARD],
        estateConfigurable: true
    },
    {
        key: FeatureKey.ANNOUNCEMENTS_EMERGENCY_SEND,
        label: 'Send emergency alerts',
        description: 'Send emergency SOS alerts to estate residents and security staff when enabled by plan.',
        category: 'Communications',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.GUARD],
        estateConfigurable: true
    },
    {
        key: FeatureKey.GATES_VIEW,
        label: 'View gates',
        description: 'View gate configuration and guard assignments for an estate.',
        category: 'Gate Operations',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.GUARD],
        estateConfigurable: true
    },
    {
        key: FeatureKey.GATES_MANAGE,
        label: 'Manage gates',
        description: 'Create and update estate gates within subscription limits.',
        category: 'Gate Operations',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN],
        estateConfigurable: true
    },
    {
        key: FeatureKey.GUARD_SHIFT_MANAGE,
        label: 'Manage guard shifts',
        description: 'Assign gates and shift metadata to guards.',
        category: 'Gate Operations',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR],
        estateConfigurable: true
    },
    {
        key: FeatureKey.SERVICE_CHARGE_PAYMENTS,
        label: 'Service charge payments',
        description: 'Allow residents to see or pay estate service charges when enabled.',
        category: 'Payments',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.RESIDENT],
        estateConfigurable: true
    },
    {
        key: FeatureKey.ESTATE_NEWS_VIEW,
        label: 'View estate news',
        description: 'Read estate news, events, advisories, and maintenance notices.',
        category: 'Communications',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.GUARD, client_1.UserRole.RESIDENT],
        estateConfigurable: true
    },
    {
        key: FeatureKey.ESTATE_NEWS_MANAGE,
        label: 'Manage estate news',
        description: 'Publish and archive estate news and event posts.',
        category: 'Communications',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN],
        estateConfigurable: true
    },
    {
        key: FeatureKey.EXPORT_REPORTS,
        label: 'Export reports',
        description: 'Export estate reports, audit trails, visitor logs, and analytics.',
        category: 'Analytics',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR],
        estateConfigurable: true
    },
    {
        key: FeatureKey.IMPORT_RESIDENTS,
        label: 'Import residents',
        description: 'Bulk upload residents or phones for OTP-based onboarding.',
        category: 'Estate Operations',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR],
        estateConfigurable: true
    },
    {
        key: FeatureKey.VISITOR_INTELLIGENCE_VIEW,
        label: 'View visitor intelligence',
        description: 'View visitor frequency, exit reliability, incident history, gates used, and risk status.',
        category: 'Visitor Intelligence',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.GUARD, client_1.UserRole.RESIDENT],
        estateConfigurable: true
    },
    {
        key: FeatureKey.VISITOR_INTELLIGENCE_MANAGE,
        label: 'Manage visitor intelligence',
        description: 'Flag, restrict, blacklist, and annotate risky visitor records.',
        category: 'Visitor Intelligence',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR],
        estateConfigurable: true
    },
    {
        key: FeatureKey.VISITOR_RISK_SCORING,
        label: 'Visitor risk scoring',
        description: 'Use visitor history and rules to score visitors with low, medium, and high risk levels.',
        category: 'Visitor Intelligence',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR, client_1.UserRole.GUARD, client_1.UserRole.RESIDENT],
        estateConfigurable: true
    },
    {
        key: FeatureKey.ANALYTICS_VIEW,
        label: 'View analytics',
        description: 'View resident, guard, visitor, gate traffic, risk, request, and notification analytics.',
        category: 'Analytics',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR],
        estateConfigurable: true
    },
    {
        key: FeatureKey.WHITE_LABEL_BRANDING,
        label: 'White-label branding',
        description: 'Enable custom branding for estate-owned web and mobile experiences.',
        category: 'Enterprise',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.ESTATE_ADMIN],
        estateConfigurable: true
    },
    {
        key: FeatureKey.API_ACCESS,
        label: 'API access',
        description: 'Enable enterprise API access for external integrations.',
        category: 'Enterprise',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.ESTATE_ADMIN],
        estateConfigurable: true
    },
    {
        key: FeatureKey.SMART_GATE_INTEGRATIONS,
        label: 'Smart gate integrations',
        description: 'Enable integrations with smart gate hardware and automation systems.',
        category: 'Enterprise',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.ESTATE_ADMIN],
        estateConfigurable: true
    },
    {
        key: FeatureKey.NOTIFICATIONS_SEND,
        label: 'Send notifications',
        description: 'Queue SMS, WhatsApp, push, or future notification requests.',
        category: 'Communications',
        defaultRoles: [client_1.UserRole.ESTATE_ADMIN, client_1.UserRole.SECURITY_SUPERVISOR],
        estateConfigurable: true
    },
    {
        key: FeatureKey.FEATURE_SETTINGS_MANAGE,
        label: 'Manage feature settings',
        description: 'Select which features are available to roles.',
        category: 'Administration',
        defaultRoles: [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.ESTATE_ADMIN],
        estateConfigurable: false
    }
];
exports.FEATURE_KEYS = exports.FEATURE_CATALOG.map((feature) => feature.key);
exports.PLAN_SCOPED_FEATURE_KEYS = exports.FEATURE_CATALOG.filter((feature) => feature.estateConfigurable).map((feature) => feature.key);
//# sourceMappingURL=feature-catalog.js.map