"""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"

# Phase 9.3 — Coach & Staff Management
STAFF_CERTIFICATES_VIEW = "sports_center.staff_certificates.view"
STAFF_CERTIFICATES_MANAGE = "sports_center.staff_certificates.manage"
STAFF_SKILLS_VIEW = "sports_center.staff_skills.view"
STAFF_SKILLS_MANAGE = "sports_center.staff_skills.manage"
STAFF_WORKING_HOURS_VIEW = "sports_center.staff_working_hours.view"
STAFF_WORKING_HOURS_MANAGE = "sports_center.staff_working_hours.manage"
STAFF_AVAILABILITY_VIEW = "sports_center.staff_availability.view"
STAFF_AVAILABILITY_MANAGE = "sports_center.staff_availability.manage"
STAFF_ASSIGNMENTS_VIEW = "sports_center.staff_assignments.view"
STAFF_ASSIGNMENTS_MANAGE = "sports_center.staff_assignments.manage"

# Phase 9.4 — Scheduling & Booking
EQUIPMENT_VIEW = "sports_center.equipment.view"
EQUIPMENT_MANAGE = "sports_center.equipment.manage"
SESSIONS_VIEW = "sports_center.sessions.view"
SESSIONS_MANAGE = "sports_center.sessions.manage"
BOOKINGS_VIEW = "sports_center.bookings.view"
BOOKINGS_MANAGE = "sports_center.bookings.manage"
WAITING_LIST_VIEW = "sports_center.waiting_list.view"
WAITING_LIST_MANAGE = "sports_center.waiting_list.manage"
RESOURCE_RESERVATIONS_VIEW = "sports_center.resource_reservations.view"
RESOURCE_RESERVATIONS_MANAGE = "sports_center.resource_reservations.manage"

# Phase 9.5 — Attendance & Access Control
ATTENDANCE_VIEW = "sports_center.attendance.view"
ATTENDANCE_MANAGE = "sports_center.attendance.manage"
CHECK_IN_MANAGE = "sports_center.check_in.manage"
ACCESS_LOGS_VIEW = "sports_center.access_logs.view"

# Phase 9.6 — Training Management
TRAINING_PROGRAMS_VIEW = "sports_center.training_programs.view"
TRAINING_PROGRAMS_MANAGE = "sports_center.training_programs.manage"
EXERCISES_VIEW = "sports_center.exercises.view"
EXERCISES_MANAGE = "sports_center.exercises.manage"
WORKOUT_PLANS_VIEW = "sports_center.workout_plans.view"
WORKOUT_PLANS_MANAGE = "sports_center.workout_plans.manage"
WORKOUT_ASSIGNMENTS_VIEW = "sports_center.workout_assignments.view"
WORKOUT_ASSIGNMENTS_MANAGE = "sports_center.workout_assignments.manage"
TRAINING_GOALS_VIEW = "sports_center.training_goals.view"
TRAINING_GOALS_MANAGE = "sports_center.training_goals.manage"
MEASUREMENTS_VIEW = "sports_center.measurements.view"
MEASUREMENTS_MANAGE = "sports_center.measurements.manage"
PROGRESS_VIEW = "sports_center.progress.view"
PROGRESS_MANAGE = "sports_center.progress.manage"
NUTRITION_PLANS_VIEW = "sports_center.nutrition_plans.view"
NUTRITION_PLANS_MANAGE = "sports_center.nutrition_plans.manage"
ASSESSMENTS_VIEW = "sports_center.assessments.view"
ASSESSMENTS_MANAGE = "sports_center.assessments.manage"
PERFORMANCE_VIEW = "sports_center.performance.view"
PERFORMANCE_MANAGE = "sports_center.performance.manage"
BODY_COMPOSITION_VIEW = "sports_center.body_composition.view"
BODY_COMPOSITION_MANAGE = "sports_center.body_composition.manage"

# Phase 9.7 — Competition & Event Management
COMPETITIONS_VIEW = "sports_center.competitions.view"
COMPETITIONS_MANAGE = "sports_center.competitions.manage"
COMPETITION_TEAMS_VIEW = "sports_center.competition_teams.view"
COMPETITION_TEAMS_MANAGE = "sports_center.competition_teams.manage"
COMPETITION_GROUPS_VIEW = "sports_center.competition_groups.view"
COMPETITION_GROUPS_MANAGE = "sports_center.competition_groups.manage"
COMPETITION_REGISTRATIONS_VIEW = "sports_center.competition_registrations.view"
COMPETITION_REGISTRATIONS_MANAGE = "sports_center.competition_registrations.manage"
COMPETITION_MATCHES_VIEW = "sports_center.competition_matches.view"
COMPETITION_MATCHES_MANAGE = "sports_center.competition_matches.manage"
COMPETITION_RESULTS_VIEW = "sports_center.competition_results.view"
COMPETITION_RESULTS_MANAGE = "sports_center.competition_results.manage"
COMPETITION_RANKINGS_VIEW = "sports_center.competition_rankings.view"
COMPETITION_MEDALS_VIEW = "sports_center.competition_medals.view"
COMPETITION_MEDALS_MANAGE = "sports_center.competition_medals.manage"
COMPETITION_JUDGES_VIEW = "sports_center.competition_judges.view"
COMPETITION_JUDGES_MANAGE = "sports_center.competition_judges.manage"
COMPETITION_CERTIFICATES_VIEW = "sports_center.competition_certificates.view"
COMPETITION_CERTIFICATES_MANAGE = "sports_center.competition_certificates.manage"

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,
    STAFF_CERTIFICATES_VIEW,
    STAFF_CERTIFICATES_MANAGE,
    STAFF_SKILLS_VIEW,
    STAFF_SKILLS_MANAGE,
    STAFF_WORKING_HOURS_VIEW,
    STAFF_WORKING_HOURS_MANAGE,
    STAFF_AVAILABILITY_VIEW,
    STAFF_AVAILABILITY_MANAGE,
    STAFF_ASSIGNMENTS_VIEW,
    STAFF_ASSIGNMENTS_MANAGE,
    EQUIPMENT_VIEW,
    EQUIPMENT_MANAGE,
    SESSIONS_VIEW,
    SESSIONS_MANAGE,
    BOOKINGS_VIEW,
    BOOKINGS_MANAGE,
    WAITING_LIST_VIEW,
    WAITING_LIST_MANAGE,
    RESOURCE_RESERVATIONS_VIEW,
    RESOURCE_RESERVATIONS_MANAGE,
    ATTENDANCE_VIEW,
    ATTENDANCE_MANAGE,
    CHECK_IN_MANAGE,
    ACCESS_LOGS_VIEW,
    TRAINING_PROGRAMS_VIEW,
    TRAINING_PROGRAMS_MANAGE,
    EXERCISES_VIEW,
    EXERCISES_MANAGE,
    WORKOUT_PLANS_VIEW,
    WORKOUT_PLANS_MANAGE,
    WORKOUT_ASSIGNMENTS_VIEW,
    WORKOUT_ASSIGNMENTS_MANAGE,
    TRAINING_GOALS_VIEW,
    TRAINING_GOALS_MANAGE,
    MEASUREMENTS_VIEW,
    MEASUREMENTS_MANAGE,
    PROGRESS_VIEW,
    PROGRESS_MANAGE,
    NUTRITION_PLANS_VIEW,
    NUTRITION_PLANS_MANAGE,
    ASSESSMENTS_VIEW,
    ASSESSMENTS_MANAGE,
    PERFORMANCE_VIEW,
    PERFORMANCE_MANAGE,
    BODY_COMPOSITION_VIEW,
    BODY_COMPOSITION_MANAGE,
    COMPETITIONS_VIEW,
    COMPETITIONS_MANAGE,
    COMPETITION_TEAMS_VIEW,
    COMPETITION_TEAMS_MANAGE,
    COMPETITION_GROUPS_VIEW,
    COMPETITION_GROUPS_MANAGE,
    COMPETITION_REGISTRATIONS_VIEW,
    COMPETITION_REGISTRATIONS_MANAGE,
    COMPETITION_MATCHES_VIEW,
    COMPETITION_MATCHES_MANAGE,
    COMPETITION_RESULTS_VIEW,
    COMPETITION_RESULTS_MANAGE,
    COMPETITION_RANKINGS_VIEW,
    COMPETITION_MEDALS_VIEW,
    COMPETITION_MEDALS_MANAGE,
    COMPETITION_JUDGES_VIEW,
    COMPETITION_JUDGES_MANAGE,
    COMPETITION_CERTIFICATES_VIEW,
    COMPETITION_CERTIFICATES_MANAGE,
]

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.",
    "sports_center.staff_certificates.",
    "sports_center.staff_skills.",
    "sports_center.staff_working_hours.",
    "sports_center.staff_availability.",
    "sports_center.staff_assignments.",
    "sports_center.equipment.",
    "sports_center.sessions.",
    "sports_center.bookings.",
    "sports_center.waiting_list.",
    "sports_center.resource_reservations.",
    "sports_center.attendance.",
    "sports_center.check_in.",
    "sports_center.access_logs.",
    "sports_center.training_programs.",
    "sports_center.exercises.",
    "sports_center.workout_plans.",
    "sports_center.workout_assignments.",
    "sports_center.training_goals.",
    "sports_center.measurements.",
    "sports_center.progress.",
    "sports_center.nutrition_plans.",
    "sports_center.assessments.",
    "sports_center.performance.",
    "sports_center.body_composition.",
    "sports_center.competitions.",
    "sports_center.competition_teams.",
    "sports_center.competition_groups.",
    "sports_center.competition_registrations.",
    "sports_center.competition_matches.",
    "sports_center.competition_results.",
    "sports_center.competition_rankings.",
    "sports_center.competition_medals.",
    "sports_center.competition_judges.",
    "sports_center.competition_certificates.",
)
