<?php

namespace Kylin\Catering\Enums;

/**
 * 餐桌状态
 */
enum TableStatus: string
{
    case Available = 'available';     // 空闲
    case Occupied = 'occupied';       // 占用
    case Reserved = 'reserved';       // 预约
    case Cleaning = 'cleaning';       // 清洁中

    public function label(): string
    {
        return match ($this) {
            self::Available => '空闲',
            self::Occupied => '占用',
            self::Reserved => '预约',
            self::Cleaning => '清洁中',
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::Available => 'success',
            self::Occupied => 'danger',
            self::Reserved => 'warning',
            self::Cleaning => 'info',
        };
    }
}
