<?php

namespace App\Enums;

enum BookingType: string
{
    case VIDEO = 'video';
    case LIVESTREAM = 'livestream';

    public function label(): string
    {
        return match ($this) {
            self::VIDEO => 'Video',
            self::LIVESTREAM => 'Livestream',
        };
    }

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

    public static function default(): self
    {
        return self::VIDEO;
    }

    public static function options(): array
    {
        return array_map(fn($case) => [
            'value' => $case->value,
            'label' => $case->label(),
        ], self::cases());
    }
}
