<?php

namespace App\Enums;

use App\Traits\WithCommentEnum;
use App\Traits\WithValueEnum;

enum OrderChannel: int
{
    use WithCommentEnum, WithValueEnum;

    case OUTLET = 1;
    case SHOPEE = 2;
    case TOKOPEDIA = 3;
    case WEBSITE = 4;
    case INSTAGRAM = 5;
    case WHATSAPP = 6;
    case OTHER = 7;

    public function label(): string
    {
        return match ($this) {
            self::OUTLET => 'Outlet',
            self::SHOPEE => 'Shopee',
            self::TOKOPEDIA => 'Tokopedia',
            self::WEBSITE => 'Website',
            self::INSTAGRAM => 'Instagram',
            self::WHATSAPP => 'WhatsApp',
            self::OTHER => 'Lainnya',
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::OUTLET => 'emerald',
            self::SHOPEE => 'orange',
            self::TOKOPEDIA => 'green',
            self::WEBSITE => 'blue',
            self::INSTAGRAM => 'pink',
            self::WHATSAPP => 'lime',
            self::OTHER => 'gray',
        };
    }
}
