<?php

namespace App\Enums;

enum OrderCarrier: string
{
    case Moovin = 'moovin';
    case CorreosCR = 'correos_cr';

    public function label(): string
    {
        return match ($this) {
            self::Moovin => 'Moovin',
            self::CorreosCR => 'Correos de Costa Rica',
        };
    }

    /** @return array<string, string> */
    public static function options(): array
    {
        $options = [];
        foreach (self::cases() as $case) {
            $options[$case->value] = $case->label();
        }

        return $options;
    }
}
