<?php

declare(strict_types=1);

namespace App\Enums;

use Filament\Support\Contracts\HasLabel;

enum DocumentType: string implements HasLabel
{
    case Passport = 'passport';
    case Contract = 'contract';
    case MedicalCertificate = 'medical_certificate';
    case EducationCertificate = 'education_certificate';
    case Other = 'other';

    public function getLabel(): string
    {
        return match ($this) {
            self::Passport => __('enums.document_type.passport'),
            self::Contract => __('enums.document_type.contract'),
            self::MedicalCertificate => __('enums.document_type.medical_certificate'),
            self::EducationCertificate => __('enums.document_type.education_certificate'),
            self::Other => __('enums.document_type.other'),
        };
    }

    public function label(): string
    {
        return $this->getLabel();
    }

    public function color(): string
    {
        return match ($this) {
            self::Passport => 'primary',
            self::Contract => 'success',
            self::MedicalCertificate => 'danger',
            self::EducationCertificate => 'info',
            self::Other => 'gray',
        };
    }

    public function icon(): string
    {
        return match ($this) {
            self::Passport => 'heroicon-o-identification',
            self::Contract => 'heroicon-o-document-text',
            self::MedicalCertificate => 'heroicon-o-heart',
            self::EducationCertificate => 'heroicon-o-academic-cap',
            self::Other => 'heroicon-o-folder',
        };
    }
}
