"""Sports Center permission definitions — Phase 9.0 foundation."""
from __future__ import annotations

SPORTS_CENTER_VIEW = "sports_center.view"
SPORTS_CENTER_MANAGE = "sports_center.manage"

SPORTS_CENTERS_VIEW = "sports_center.sports_centers.view"
SPORTS_CENTERS_CREATE = "sports_center.sports_centers.create"
SPORTS_CENTERS_UPDATE = "sports_center.sports_centers.update"
SPORTS_CENTERS_DELETE = "sports_center.sports_centers.delete"
SPORTS_CENTERS_MANAGE = "sports_center.sports_centers.manage"

BRANCHES_VIEW = "sports_center.branches.view"
BRANCHES_CREATE = "sports_center.branches.create"
BRANCHES_UPDATE = "sports_center.branches.update"
BRANCHES_DELETE = "sports_center.branches.delete"
BRANCHES_MANAGE = "sports_center.branches.manage"

SPORTS_VIEW = "sports_center.sports.view"
SPORTS_CREATE = "sports_center.sports.create"
SPORTS_UPDATE = "sports_center.sports.update"
SPORTS_DELETE = "sports_center.sports.delete"
SPORTS_MANAGE = "sports_center.sports.manage"

MEMBERSHIP_TYPES_VIEW = "sports_center.membership_types.view"
MEMBERSHIP_TYPES_CREATE = "sports_center.membership_types.create"
MEMBERSHIP_TYPES_UPDATE = "sports_center.membership_types.update"
MEMBERSHIP_TYPES_DELETE = "sports_center.membership_types.delete"
MEMBERSHIP_TYPES_MANAGE = "sports_center.membership_types.manage"

# Phase 9.1 — Membership Catalog
SPORT_CATEGORIES_VIEW = "sports_center.sport_categories.view"
SPORT_CATEGORIES_MANAGE = "sports_center.sport_categories.manage"
AGE_GROUPS_VIEW = "sports_center.age_groups.view"
AGE_GROUPS_MANAGE = "sports_center.age_groups.manage"
PRICING_MODELS_VIEW = "sports_center.pricing_models.view"
PRICING_MODELS_MANAGE = "sports_center.pricing_models.manage"
MEMBERSHIP_PACKAGES_VIEW = "sports_center.membership_packages.view"
MEMBERSHIP_PACKAGES_MANAGE = "sports_center.membership_packages.manage"
MEMBERSHIP_PLANS_VIEW = "sports_center.membership_plans.view"
MEMBERSHIP_PLANS_MANAGE = "sports_center.membership_plans.manage"
MEMBERSHIP_RULES_VIEW = "sports_center.membership_rules.view"
MEMBERSHIP_RULES_MANAGE = "sports_center.membership_rules.manage"
RENEWAL_POLICIES_VIEW = "sports_center.renewal_policies.view"
RENEWAL_POLICIES_MANAGE = "sports_center.renewal_policies.manage"
FREEZING_RULES_VIEW = "sports_center.freezing_rules.view"
FREEZING_RULES_MANAGE = "sports_center.freezing_rules.manage"
EXPIRATION_POLICIES_VIEW = "sports_center.expiration_policies.view"
EXPIRATION_POLICIES_MANAGE = "sports_center.expiration_policies.manage"

MEMBERSHIPS_VIEW = "sports_center.memberships.view"
MEMBERSHIPS_CREATE = "sports_center.memberships.create"
MEMBERSHIPS_UPDATE = "sports_center.memberships.update"
MEMBERSHIPS_DELETE = "sports_center.memberships.delete"
MEMBERSHIPS_MANAGE = "sports_center.memberships.manage"
MEMBERSHIPS_ASSIGN = "sports_center.memberships.assign"
MEMBERSHIPS_STATUS = "sports_center.memberships.status"

MEMBERS_VIEW = "sports_center.members.view"
MEMBERS_CREATE = "sports_center.members.create"
MEMBERS_UPDATE = "sports_center.members.update"
MEMBERS_DELETE = "sports_center.members.delete"
MEMBERS_MANAGE = "sports_center.members.manage"

FAMILY_MEMBERS_VIEW = "sports_center.family_members.view"
FAMILY_MEMBERS_MANAGE = "sports_center.family_members.manage"
EMERGENCY_CONTACTS_VIEW = "sports_center.emergency_contacts.view"
EMERGENCY_CONTACTS_MANAGE = "sports_center.emergency_contacts.manage"
MEDICAL_VIEW = "sports_center.medical.view"
MEDICAL_MANAGE = "sports_center.medical.manage"
MEMBERSHIP_CARDS_VIEW = "sports_center.membership_cards.view"
MEMBERSHIP_CARDS_MANAGE = "sports_center.membership_cards.manage"
DIGITAL_MEMBERSHIPS_VIEW = "sports_center.digital_memberships.view"
DIGITAL_MEMBERSHIPS_MANAGE = "sports_center.digital_memberships.manage"
WAIVERS_VIEW = "sports_center.waivers.view"
WAIVERS_MANAGE = "sports_center.waivers.manage"
MEMBER_DOCUMENTS_VIEW = "sports_center.member_documents.view"
MEMBER_DOCUMENTS_MANAGE = "sports_center.member_documents.manage"

COACHES_VIEW = "sports_center.coaches.view"
COACHES_CREATE = "sports_center.coaches.create"
COACHES_UPDATE = "sports_center.coaches.update"
COACHES_DELETE = "sports_center.coaches.delete"
COACHES_MANAGE = "sports_center.coaches.manage"

ROLES_VIEW = "sports_center.roles.view"
ROLES_MANAGE = "sports_center.roles.manage"
PERMISSIONS_VIEW = "sports_center.permissions.view"
PERMISSIONS_MANAGE = "sports_center.permissions.manage"

FACILITIES_VIEW = "sports_center.facilities.view"
FACILITIES_CREATE = "sports_center.facilities.create"
FACILITIES_UPDATE = "sports_center.facilities.update"
FACILITIES_DELETE = "sports_center.facilities.delete"
FACILITIES_MANAGE = "sports_center.facilities.manage"

COURTS_VIEW = "sports_center.courts.view"
COURTS_MANAGE = "sports_center.courts.manage"
ROOMS_VIEW = "sports_center.rooms.view"
ROOMS_MANAGE = "sports_center.rooms.manage"
LOCKER_ROOMS_VIEW = "sports_center.locker_rooms.view"
LOCKER_ROOMS_MANAGE = "sports_center.locker_rooms.manage"
LOCKERS_VIEW = "sports_center.lockers.view"
LOCKERS_MANAGE = "sports_center.lockers.manage"
LOCKERS_ASSIGN = "sports_center.lockers.assign"

DEVICES_VIEW = "sports_center.devices.view"
DEVICES_CREATE = "sports_center.devices.create"
DEVICES_UPDATE = "sports_center.devices.update"
DEVICES_MANAGE = "sports_center.devices.manage"
DEVICES_CONNECT = "sports_center.devices.connect"

DEVICE_PROVIDERS_VIEW = "sports_center.device_providers.view"
DEVICE_PROVIDERS_MANAGE = "sports_center.device_providers.manage"

ATTENDANCE_GATEWAYS_VIEW = "sports_center.attendance_gateways.view"
ATTENDANCE_GATEWAYS_MANAGE = "sports_center.attendance_gateways.manage"

CONFIGURATION_VIEW = "sports_center.configuration.view"
CONFIGURATION_MANAGE = "sports_center.configuration.manage"
EVENTS_VIEW = "sports_center.events.view"
EVENTS_MANAGE = "sports_center.events.manage"
SETTINGS_VIEW = "sports_center.settings.view"
SETTINGS_MANAGE = "sports_center.settings.manage"
AUDIT_VIEW = "sports_center.audit.view"

ALL_PERMISSIONS: list[str] = [
    SPORTS_CENTER_VIEW,
    SPORTS_CENTER_MANAGE,
    SPORTS_CENTERS_VIEW,
    SPORTS_CENTERS_CREATE,
    SPORTS_CENTERS_UPDATE,
    SPORTS_CENTERS_DELETE,
    SPORTS_CENTERS_MANAGE,
    BRANCHES_VIEW,
    BRANCHES_CREATE,
    BRANCHES_UPDATE,
    BRANCHES_DELETE,
    BRANCHES_MANAGE,
    SPORTS_VIEW,
    SPORTS_CREATE,
    SPORTS_UPDATE,
    SPORTS_DELETE,
    SPORTS_MANAGE,
    MEMBERSHIP_TYPES_VIEW,
    MEMBERSHIP_TYPES_CREATE,
    MEMBERSHIP_TYPES_UPDATE,
    MEMBERSHIP_TYPES_DELETE,
    MEMBERSHIP_TYPES_MANAGE,
    SPORT_CATEGORIES_VIEW,
    SPORT_CATEGORIES_MANAGE,
    AGE_GROUPS_VIEW,
    AGE_GROUPS_MANAGE,
    PRICING_MODELS_VIEW,
    PRICING_MODELS_MANAGE,
    MEMBERSHIP_PACKAGES_VIEW,
    MEMBERSHIP_PACKAGES_MANAGE,
    MEMBERSHIP_PLANS_VIEW,
    MEMBERSHIP_PLANS_MANAGE,
    MEMBERSHIP_RULES_VIEW,
    MEMBERSHIP_RULES_MANAGE,
    RENEWAL_POLICIES_VIEW,
    RENEWAL_POLICIES_MANAGE,
    FREEZING_RULES_VIEW,
    FREEZING_RULES_MANAGE,
    EXPIRATION_POLICIES_VIEW,
    EXPIRATION_POLICIES_MANAGE,
    MEMBERSHIPS_VIEW,
    MEMBERSHIPS_CREATE,
    MEMBERSHIPS_UPDATE,
    MEMBERSHIPS_DELETE,
    MEMBERSHIPS_MANAGE,
    MEMBERSHIPS_ASSIGN,
    MEMBERSHIPS_STATUS,
    MEMBERS_VIEW,
    MEMBERS_CREATE,
    MEMBERS_UPDATE,
    MEMBERS_DELETE,
    MEMBERS_MANAGE,
    FAMILY_MEMBERS_VIEW,
    FAMILY_MEMBERS_MANAGE,
    EMERGENCY_CONTACTS_VIEW,
    EMERGENCY_CONTACTS_MANAGE,
    MEDICAL_VIEW,
    MEDICAL_MANAGE,
    MEMBERSHIP_CARDS_VIEW,
    MEMBERSHIP_CARDS_MANAGE,
    DIGITAL_MEMBERSHIPS_VIEW,
    DIGITAL_MEMBERSHIPS_MANAGE,
    WAIVERS_VIEW,
    WAIVERS_MANAGE,
    MEMBER_DOCUMENTS_VIEW,
    MEMBER_DOCUMENTS_MANAGE,
    COACHES_VIEW,
    COACHES_CREATE,
    COACHES_UPDATE,
    COACHES_DELETE,
    COACHES_MANAGE,
    ROLES_VIEW,
    ROLES_MANAGE,
    PERMISSIONS_VIEW,
    PERMISSIONS_MANAGE,
    FACILITIES_VIEW,
    FACILITIES_CREATE,
    FACILITIES_UPDATE,
    FACILITIES_DELETE,
    FACILITIES_MANAGE,
    COURTS_VIEW,
    COURTS_MANAGE,
    ROOMS_VIEW,
    ROOMS_MANAGE,
    LOCKER_ROOMS_VIEW,
    LOCKER_ROOMS_MANAGE,
    LOCKERS_VIEW,
    LOCKERS_MANAGE,
    LOCKERS_ASSIGN,
    DEVICES_VIEW,
    DEVICES_CREATE,
    DEVICES_UPDATE,
    DEVICES_MANAGE,
    DEVICES_CONNECT,
    DEVICE_PROVIDERS_VIEW,
    DEVICE_PROVIDERS_MANAGE,
    ATTENDANCE_GATEWAYS_VIEW,
    ATTENDANCE_GATEWAYS_MANAGE,
    CONFIGURATION_VIEW,
    CONFIGURATION_MANAGE,
    EVENTS_VIEW,
    EVENTS_MANAGE,
    SETTINGS_VIEW,
    SETTINGS_MANAGE,
    AUDIT_VIEW,
]

PERMISSION_PREFIXES: tuple[str, ...] = (
    "sports_center.",
    "sports_center.sports_centers.",
    "sports_center.branches.",
    "sports_center.sports.",
    "sports_center.membership_types.",
    "sports_center.sport_categories.",
    "sports_center.age_groups.",
    "sports_center.pricing_models.",
    "sports_center.membership_packages.",
    "sports_center.membership_plans.",
    "sports_center.membership_rules.",
    "sports_center.renewal_policies.",
    "sports_center.freezing_rules.",
    "sports_center.expiration_policies.",
    "sports_center.memberships.",
    "sports_center.members.",
    "sports_center.family_members.",
    "sports_center.emergency_contacts.",
    "sports_center.medical.",
    "sports_center.membership_cards.",
    "sports_center.digital_memberships.",
    "sports_center.waivers.",
    "sports_center.member_documents.",
    "sports_center.coaches.",
    "sports_center.roles.",
    "sports_center.permissions.",
    "sports_center.facilities.",
    "sports_center.courts.",
    "sports_center.rooms.",
    "sports_center.locker_rooms.",
    "sports_center.lockers.",
    "sports_center.devices.",
    "sports_center.device_providers.",
    "sports_center.attendance_gateways.",
    "sports_center.configuration.",
    "sports_center.events.",
    "sports_center.settings.",
    "sports_center.audit.",
)
