value}"); } public function getColor(): string { return match ($this) { self::Requested => 'warning', self::Returned => 'danger', self::Published => 'success', self::Commented => 'gray', }; } public function getIcon(): string { return match ($this) { self::Requested => 'heroicon-o-hand-raised', self::Returned => 'heroicon-o-arrow-uturn-left', self::Published => 'heroicon-o-check-circle', self::Commented => 'heroicon-o-chat-bubble-left-ellipsis', }; } /** @return array */ public static function options(): array { return collect(self::cases()) ->mapWithKeys(fn (self $case) => [$case->value => $case->getLabel()]) ->all(); } }