<?php

namespace App\Support;

enum OperationRunType: string
{
    case BaselineCapture = 'baseline.capture';
    case BaselineCompare = 'baseline.compare';
    case InventorySync = 'inventory.sync';
    case PolicySync = 'policy.sync';
    case DirectoryGroupsSync = 'directory.groups.sync';
    case BackupSetUpdate = 'backup_set.update';
    case BackupScheduleExecute = 'backup.schedule.execute';
    case BackupScheduleRetention = 'backup.schedule.retention';
    case BackupSchedulePurge = 'backup.schedule.purge';
    case DirectoryRoleDefinitionsSync = 'directory.role_definitions.sync';
    case RestoreExecute = 'restore.execute';
    case PromotionExecute = 'promotion.execute';
    case EntraAdminRolesScan = 'entra.admin_roles.scan';
    case ReviewPackGenerate = 'environment.review_pack.generate';
    case EnvironmentReviewCompose = 'environment.review.compose';
    case EvidenceSnapshotGenerate = 'tenant.evidence.snapshot.generate';
    case RbacHealthCheck = 'rbac.health_check';

    public static function values(): array
    {
        return array_map(static fn (self $case): string => $case->value, self::cases());
    }

    public function canonicalCode(): string
    {
        return $this->value;
    }
}
