<?php

namespace App\Enums;

use App\Enums\Traits\HasLabels;

/**
 * @OA\Schema(
 *   schema="RoomStatus",
 *   type="string",
 *   enum={"active", "closed", "fire", "error"},
 *   example="error"
 * )
 */
enum RoomStatus: string {
    use HasLabels;

    case Active = 'active';
    case Closed = 'closed';
    case Fire ='fire';
    case Error = 'error';

    // 返回對應的顯示文字
    public function labels(): string
    {
        return match($this) {
            self::Active => __('enums.room.status.Active'),
            self::Closed => __('enums.room.status.Closed'),
            self::Fire => __('enums.room.status.Fire'),
            self::Error => __('enums.room.status.Error'),
        };
    }
}
