<?php

namespace App\Support\Providers;

enum ProviderConsentStatus: string
{
    case Unknown = 'unknown';
    case Required = 'required';
    case Granted = 'granted';
    case Failed = 'failed';
    case Revoked = 'revoked';

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

    public function isGranted(): bool
    {
        return $this === self::Granted;
    }
}
