<?php

declare(strict_types=1);

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

/**
 * Enum StavRegistracie
 *
 * @package Seka\Portal\Modul\Terminy\Entities\Udalost
 */
enum StavRegistracie: string
{
    case POVOLENA = 'POVOLENA';
    case NEPOVOLENA = 'NEPOVOLENA';

    /**
     * @return string
     */
    public function label(): string
    {
        return match ($this) {
            self::POVOLENA => 'povoliť',
            self::NEPOVOLENA => 'nepovoliť',
        };
    }

    /**
     * @return string
     */
    public function color(): string
    {
        return match ($this) {
            self::POVOLENA => '#c0d1d8',
            self::NEPOVOLENA => '#efe1e6',
        };
    }

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