value}"); } public function getColor(): string { return match ($this) { self::New => 'warning', self::Contacted => 'info', self::Accepted => 'success', self::Declined => 'gray', self::Spam => 'danger', }; } /** * Whether reaching this status means somebody dealt with the submission. */ public function isHandled(): bool { return $this !== self::New; } /** @return array */ public static function options(): array { return collect(self::cases()) ->mapWithKeys(fn (self $case) => [$case->value => $case->getLabel()]) ->all(); } }