<?php

namespace App\Domain\Documents\Enums;

/** Document groupings used by the Document Center tabs (§17B.1). */
enum DocumentCategory: string
{
    case Identity = 'identity';
    case Photo = 'photo';
    case Education = 'education';
    case Experience = 'experience';
    case Skill = 'skill';
    case Medical = 'medical';
    case Police = 'police';
    case Visa = 'visa';
    case Travel = 'travel';
    case Contract = 'contract';
    case Financial = 'financial';
    case Employer = 'employer';
    case Other = 'other';

    public function label(): string
    {
        return match ($this) {
            self::Identity => 'Identity',
            self::Photo => 'Photos',
            self::Education => 'Education',
            self::Experience => 'Experience',
            self::Skill => 'Skills & Trade',
            self::Medical => 'Medical',
            self::Police => 'Police Clearance',
            self::Visa => 'Visa & Immigration',
            self::Travel => 'Travel',
            self::Contract => 'Contracts',
            self::Financial => 'Financial',
            self::Employer => 'Employer',
            self::Other => 'Other',
        };
    }

    /** @return array<int, string> */
    public static function values(): array
    {
        return array_column(self::cases(), 'value');
    }
}
