<?php

declare(strict_types=1);

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

/**
 * Enum DruhPalivaEnum
 *
 * @package Seka\Portal\Modul\Statistiky\Entities\Zaznam\Enums
 */
enum DruhPalivaEnum: string
{
    case B = 'B';
    case D = 'D';
    case E = 'E';
    case NG = 'NG';
    case LPG = 'LPG';
    case B_NG = 'B_NG';
    case B_LPG = 'B_LPG';

    /**
     * @return string
     */
    public function label(): string
    {
        return match ($this) {
            self::B => 'B',
            self::D => 'D',
            self::E => 'E',
            self::NG => 'NG',
            self::LPG => 'LPG',
            self::B_NG => 'B/NG',
            self::B_LPG => 'B/LPG',
        };
    }

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