<?php

namespace App\Enums;

enum OrderChannel: string
{
    case Manual = 'manual';
    case Shopify = 'shopify';

    public function label(): string
    {
        return match ($this) {
            self::Manual => 'Manual (carritos abandonados)',
            self::Shopify => 'Shopify',
        };
    }

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

        return $options;
    }
}
