<?php

declare(strict_types=1);

namespace Seka\Portal\Modul\Statistiky\Repositories\Eloquent\Transformers\Summary\ECharts;

/**
 * Enum StavKontrolyChartEnum
 *
 * @package Seka\Portal\Modul\Statistiky\Repositories\Eloquent\Transformers\Summary\ECharts
 */
enum StavKontrolyChartEnum: string
{
    case ROZPRACOVANE = 'ROZPRACOVANE';
    case ARCHIV = 'ARCHIV';
    case STORNO = 'STORNO';

    /**
     * @return string
     */
    public function label(): string
    {
        return match ($this) {
            self::ROZPRACOVANE => 'rozpracovane',
            self::ARCHIV => 'archív',
            self::STORNO => 'storno',
        };
    }

    /**
     * @param \Seka\Portal\Modul\Statistiky\Repositories\Eloquent\Transformers\Summary\ECharts\StavKontrolyChartEnum $other
     *
     * @return bool
     */
    public function equal(self $other): bool
    {
        return $this === $other;
    }
}
