<?php

declare(strict_types=1);

namespace Seka\Portal\Modul\Statistiky\Entities\Zaznam\Enums;

/**
 * Enum StavEmisnejKontrolyEnum
 *
 * @package Seka\Portal\Modul\Statistiky\Entities\Zaznam\Enums
 */
enum StavEmisnejKontrolyEnum: string
{
    case PRIJEM = 'PRIJEM';
    case PREVZATIE = 'PREVZATIE';
    case MERANIE = 'MERANIE';
    case UZAVRETIE = 'UZAVRETIE';
    case ARCHIV = 'ARCHIV';
    case STORNO = 'STORNO';

    /**
     * @return string
     */
    public function label(): string
    {
        return match ($this) {
            self::PRIJEM => 'príjem',
            self::PREVZATIE => 'prevzatie',
            self::MERANIE => 'meranie',
            self::UZAVRETIE => 'uzavretie',
            self::ARCHIV => 'archív',
            self::STORNO => 'storno',
        };
    }

    /**
     * @param \Seka\Portal\Modul\Statistiky\Entities\Zaznam\Enums\StavEmisnejKontrolyEnum $other
     *
     * @return bool
     */
    public function equal(self $other): bool
    {
        return $this === $other;
    }
}
