<?php

namespace App\Enums;

enum LaunchType: string
{
    case CHAIN = 'CHAIN';
    case LSM = 'LSM';
    case HYDRAULIC = 'HYDRAULIC';
    case GRAVITY = 'GRAVITY';
    case OTHER = 'OTHER';

    public function label(): string
    {
        return match($this) {
            self::CHAIN => 'Chain Lift',
            self::LSM => 'LSM Launch',
            self::HYDRAULIC => 'Hydraulic Launch',
            self::GRAVITY => 'Gravity',
            self::OTHER => 'Other',
        };
    }

    public static function values(): array
    {
        return array_column(self::cases(), 'value');
    }

    public static function labels(): array
    {
        return array_map(fn($case) => $case->label(), self::cases());
    }

    public static function options(): array
    {
        return array_combine(self::values(), self::labels());
    }
}