<?php

namespace App\Domain\Expenses\Enums;

/** The kinds of supplier an agency deals with (§43). */
enum VendorType: string
{
    case MedicalCenter = 'medical_center';
    case Airline = 'airline';
    case TrainingCenter = 'training_center';
    case Transport = 'transport';
    case Legal = 'legal';
    case OverseasPartner = 'overseas_partner';
    case EmbassyService = 'embassy_service';
    case Printing = 'printing';
    case OfficeVendor = 'office_vendor';
    case Other = 'other';

    public function label(): string
    {
        return match ($this) {
            self::MedicalCenter => 'Medical Centre',
            self::Airline => 'Airline / Ticketing',
            self::TrainingCenter => 'Training Centre',
            self::Transport => 'Transport',
            self::Legal => 'Legal',
            self::OverseasPartner => 'Overseas Partner',
            self::EmbassyService => 'Embassy Service',
            self::Printing => 'Printing',
            self::OfficeVendor => 'Office Vendor',
            self::Other => 'Other',
        };
    }

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