Aplikasi Keuangan yang mengatur lalu lintas transaksi antara bank dan aplikasi internal Kampus
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

31 lines
689 B

<?php
namespace App\Domains\Account\Enums;
use App\UI\Enums\Concerns\InteractsWithLabels;
use App\UI\Enums\Contracts\HasLabel;
use App\UI\Enums\Contracts\HasUiBadge;
enum GenderOption: string implements HasLabel, HasUiBadge
{
use InteractsWithLabels;
case MALE = 'male';
case FEMALE = 'female';
public static function fromLabel($value): self
{
return match ($value) {
self::MALE->label() => self::MALE,
self::FEMALE->label() => self::FEMALE,
};
}
public function variant(): string
{
return match ($this) {
self::MALE => 'primary',
self::FEMALE => 'secondary',
};
}
}