<?php

namespace App\Models\Hodnotenie;

use Spatie\Enum\Laravel\Enum;

/**
 * Class HodnotenieEnum
 *
 *
 * @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',
        ];
    }

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