<?php

namespace App\Enums;

use App\Traits\ProvidesEnumOptions;

enum RawMaterialUnit: string
{
    use ProvidesEnumOptions;

    case YARD = 'yard';
    case METER = 'meter';
    case KILOGRAM = 'kilogram';

    public function label(): string
    {
        return match ($this) {
            self::YARD => 'Yard',
            self::METER => 'Meter',
            self::KILOGRAM => 'Kilogram',
        };
    }

    public function abbreviation(): string
    {
        return match ($this) {
            self::YARD => 'yard',
            self::METER => 'm',
            self::KILOGRAM => 'kg',
        };
    }
}
