<?php

namespace App\Models\Hodnotenie;

use Spatie\Enum\Laravel\Enum;

/**
 * Class HodnotenieEnum
 *
 * @package App\Models\Hodnotenie
 *
 * @method static self kladne()
 * @method static self zaporne()
 * @method static self neutralne()
 */
class HodnotenieEnum extends Enum
{
    /**
     * @return string[]
     */
    public static function labels(): array
    {
        return [
            'kladne' => 'kladné',
            'zaporne' => 'záporné',
            'neutralne' => 'neutrálne',
        ];
    }

    /**
     * @return string
     */
    public function color(): string
    {
        switch ($this->value) {
            case self::kladne():
                return 'success';
            case self::zaporne():
                return 'danger';
            case self::neutralne():
            default:
                return 'warning';
        }
    }
}
