<?php

declare(strict_types=1);

namespace Seka\Portal\Modul\Terminy\Http\Controllers\Livewire\Components\Udalosti;

use Livewire\Component;
use Illuminate\Contracts\View\View;
use Seka\Portal\Modul\Terminy\Entities\Udalost\StavUdalosti;

/**
 * Class Stav
 *
 * @package Seka\Portal\Modul\Terminy\Http\Controllers\Livewire\Components\Udalosti
 */
final class Stav extends Component
{
    /**
     * @var \Seka\Portal\Modul\Terminy\Entities\Udalost\StavUdalosti[]
     */
    public array $zoznam;

    /**
     * @throws \ReflectionException
     */
    public function mount(): void
    {
        $this->zoznam = StavUdalosti::toArray();
    }

    /**
     * @return \Illuminate\Contracts\View\View
     * @throws \Illuminate\Contracts\Container\BindingResolutionException
     */
    public function render(): View
    {
        return view('Terminy::components.livewire.udalosti.stav');
    }

    /**
     * @return \Seka\Portal\Modul\Terminy\Entities\Udalost\StavUdalosti[]
     */
    public function zoznam(): array
    {
        return $this->zoznam;
    }
}
