mirror of
https://github.com/pelican-dev/panel.git
synced 2025-11-09 17:59:31 +01:00
36 lines
740 B
PHP
36 lines
740 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use Filament\Support\Contracts\HasLabel;
|
|
|
|
enum PluginStatus: string implements HasLabel
|
|
{
|
|
case Disabled = 'disabled';
|
|
case Enabled = 'enabled';
|
|
case Errored = 'errored';
|
|
|
|
public function icon(): string
|
|
{
|
|
return match ($this) {
|
|
self::Disabled => 'tabler-heart-off',
|
|
self::Enabled => 'tabler-heart-check',
|
|
self::Errored => 'tabler-heart-x',
|
|
};
|
|
}
|
|
|
|
public function color(): string
|
|
{
|
|
return match ($this) {
|
|
self::Disabled => 'gray',
|
|
self::Enabled => 'success',
|
|
self::Errored => 'danger',
|
|
};
|
|
}
|
|
|
|
public function getLabel(): ?string
|
|
{
|
|
return $this->name;
|
|
}
|
|
}
|