<?php

namespace MintyPHP\Service\Access;

final class UiCapabilityMap
{
    /**
     * @var array<string, string>
     */
    public const LAYOUT = [
        'can_view_tenants' => TenantAuthorizationPolicy::ABILITY_ADMIN_TENANTS_VIEW,
        'can_view_departments' => DepartmentAuthorizationPolicy::ABILITY_ADMIN_DEPARTMENTS_VIEW,
        'can_view_users' => UserAuthorizationPolicy::ABILITY_ADMIN_USERS_VIEW,
        'can_view_roles' => RoleAuthorizationPolicy::ABILITY_ADMIN_ROLES_VIEW,
        'can_view_permissions' => PermissionAuthorizationPolicy::ABILITY_ADMIN_PERMISSIONS_VIEW,
        'can_view_settings' => SettingsAuthorizationPolicy::ABILITY_ADMIN_SETTINGS_VIEW,
        'can_view_imports' => OperationsAuthorizationPolicy::ABILITY_ADMIN_IMPORTS_VIEW,
        'can_view_jobs' => OperationsAuthorizationPolicy::ABILITY_ADMIN_JOBS_VIEW,
        'can_view_api_docs' => OperationsAuthorizationPolicy::ABILITY_ADMIN_API_DOCS_VIEW,
        'can_view_docs' => OperationsAuthorizationPolicy::ABILITY_ADMIN_DOCS_VIEW,
        'can_view_mail_log' => OperationsAuthorizationPolicy::ABILITY_ADMIN_MAIL_LOG_VIEW,
        'can_view_api_audit' => OperationsAuthorizationPolicy::ABILITY_ADMIN_API_AUDIT_VIEW,
        'can_view_system_audit' => OperationsAuthorizationPolicy::ABILITY_ADMIN_SYSTEM_AUDIT_VIEW,
        'can_view_imports_audit' => OperationsAuthorizationPolicy::ABILITY_ADMIN_IMPORTS_AUDIT_VIEW,
        'can_view_user_lifecycle_audit' => OperationsAuthorizationPolicy::ABILITY_ADMIN_USER_LIFECYCLE_AUDIT_VIEW,
        'can_view_stats' => OperationsAuthorizationPolicy::ABILITY_ADMIN_STATS_VIEW,
        'can_view_address_book' => OperationsAuthorizationPolicy::ABILITY_ADDRESS_BOOK_VIEW,
    ];

    /**
     * @var array<string, string>
     */
    public const PAGE_USERS_INDEX = [
        'can_create_user' => UserAuthorizationPolicy::ABILITY_ADMIN_USERS_CREATE,
        'can_update_users' => UserAuthorizationPolicy::ABILITY_ADMIN_USERS_ACTIVATE,
        'can_delete_users' => UserAuthorizationPolicy::ABILITY_ADMIN_USERS_DELETE,
        'can_access_pdf' => UserAuthorizationPolicy::ABILITY_ADMIN_USERS_ACCESS_PDF,
    ];

    /**
     * @var array<string, string>
     */
    public const PAGE_USERS_CREATE = [
        'can_manage_assignments' => OperationsAuthorizationPolicy::ABILITY_ADMIN_USERS_ASSIGNMENTS_MANAGE,
        'can_edit_custom_field_values' => OperationsAuthorizationPolicy::ABILITY_ADMIN_USERS_CREATE_EDIT_CUSTOM_FIELDS,
    ];

    /**
     * @var array<string, string>
     */
    public const PAGE_STATS_INDEX = [
        'can_view_mail_log' => OperationsAuthorizationPolicy::ABILITY_ADMIN_MAIL_LOG_VIEW,
        'can_view_users' => UserAuthorizationPolicy::ABILITY_ADMIN_USERS_VIEW,
        'can_view_tenants' => TenantAuthorizationPolicy::ABILITY_ADMIN_TENANTS_VIEW,
        'can_view_imports_audit' => OperationsAuthorizationPolicy::ABILITY_ADMIN_IMPORTS_AUDIT_VIEW,
        'can_view_system_audit' => OperationsAuthorizationPolicy::ABILITY_ADMIN_SYSTEM_AUDIT_VIEW,
        'can_view_user_lifecycle_audit' => OperationsAuthorizationPolicy::ABILITY_ADMIN_USER_LIFECYCLE_AUDIT_VIEW,
    ];

    /**
     * @var array<string, string>
     */
    public const PAGE_AUDIT_PURGE = [
        'can_purge' => SettingsAuthorizationPolicy::ABILITY_ADMIN_SETTINGS_UPDATE,
    ];

    /**
     * @var array<string, string>
     */
    public const PAGE_SYSTEM_AUDIT = [
        'can_purge_system_audit' => OperationsAuthorizationPolicy::ABILITY_ADMIN_SYSTEM_AUDIT_PURGE,
    ];

    /**
     * @var array<string, string>
     */
    public const PAGE_USER_LIFECYCLE_VIEW = [
        'can_restore' => OperationsAuthorizationPolicy::ABILITY_ADMIN_USERS_LIFECYCLE_RESTORE,
    ];
}
