<?php

declare(strict_types=1);

namespace Seka\Portal\Modul\Terminy\Entities\Registracia;

/**
 * Enum StavRegistracie
 *
 * @package Seka\Portal\Modul\Terminy\Entities\Registracia
 */
enum StavRegistracie: string
{
    case AKTIVNA = 'AKTIVNA';
    case ZRUSENA = 'ZRUSENA';

    /**
     * @return string
     */
    public function label(): string
    {
        return match ($this) {
            self::AKTIVNA => 'aktívna',
            self::ZRUSENA => 'zrušená',
        };
    }

    /**
     * @return string
     */
    public function color(): string
    {
        return match ($this) {
            self::AKTIVNA => '#02b875',
            self::ZRUSENA => '#ee5555',
        };
    }

    /**
     * @param \Seka\Portal\Modul\Terminy\Entities\Registracia\StavRegistracie $other
     *
     * @return bool
     */
    public function equal(self $other): bool
    {
        return $this === $other;
    }
}
