This commit is contained in:
Ovidiu U
2026-05-12 09:47:26 +01:00
parent 3d103f19e1
commit 759e4f2784
183 changed files with 20094 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
<?php
namespace App\Enums;
use Filament\Support\Contracts\HasColor;
use Filament\Support\Contracts\HasIcon;
use Filament\Support\Contracts\HasLabel;
enum ResponseStatus: string implements HasColor, HasIcon, HasLabel
{
case CacheHit = 'cache_hit';
case ApiFetched = 'api_fetched';
case NotFound = 'not_found';
case Error = 'error';
case ContactSubmitted = 'contact_submitted';
public function getLabel(): string
{
return match ($this) {
self::CacheHit => 'Cache Hit',
self::ApiFetched => 'API Fetched',
self::NotFound => 'Not Found',
self::Error => 'Error',
self::ContactSubmitted => 'Contact Submitted',
};
}
public function getColor(): string
{
return match ($this) {
self::CacheHit => 'success',
self::ApiFetched => 'info',
self::NotFound => 'warning',
self::Error => 'danger',
self::ContactSubmitted => 'primary',
};
}
public function getIcon(): string
{
return match ($this) {
self::CacheHit => 'heroicon-m-check-circle',
self::ApiFetched => 'heroicon-m-cloud-arrow-down',
self::NotFound => 'heroicon-m-magnifying-glass',
self::Error => 'heroicon-m-x-circle',
self::ContactSubmitted => 'heroicon-m-envelope',
};
}
}