<?php

declare(strict_types=1);

namespace App\Enums;

/**
 * Class UpozornenieStavEnum
 */
enum UpozornenieStavEnum: string
{
    case ALL = 'ALL';
    case READ = 'READ';
    case NOTREAD = 'NOTREAD';

    /**
     * @return string[]
     */
    protected static function labels(): array
    {
        return [
            'ALL' => 'všetky',
            'READ' => 'prečítané',
            'NOTREAD' => 'neprečítané',
        ];
    }

    public function getLabel(): string
    {
        return match ($this) {
            self::ALL => 'všetky',
            self::READ => 'prečítané',
            self::NOTREAD => 'neprečítané',
        };
    }

    public function color(): string
    {
        return match ($this->value) {
            'ALL' => '',
            'READ' => 'primary',
            default => 'success',
        };
    }

    public function equal(self $other): bool
    {
        return $this == $other;
    }
}
