35 lines
746 B
PHP
35 lines
746 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Enums;
|
|
|
|
enum RsvpStatus: string
|
|
{
|
|
case Pending = 'pending';
|
|
case Available = 'available';
|
|
case Unavailable = 'unavailable';
|
|
case Tentative = 'tentative';
|
|
|
|
public function label(): string
|
|
{
|
|
return match ($this) {
|
|
self::Pending => 'Pending',
|
|
self::Available => 'Available',
|
|
self::Unavailable => 'Unavailable',
|
|
self::Tentative => 'Tentative',
|
|
};
|
|
}
|
|
|
|
public function color(): string
|
|
{
|
|
return match ($this) {
|
|
self::Pending => 'secondary',
|
|
self::Available => 'success',
|
|
self::Unavailable => 'error',
|
|
self::Tentative => 'warning',
|
|
};
|
|
}
|
|
}
|
|
|