<?php

declare(strict_types=1);

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

use Livewire\Component;
use Illuminate\Contracts\View\View;
use Seka\Terminy\Models\Udalost\StavUdalosti;

/**
 * Class Stav
 *
 * @package Seka\Terminy\Http\Controllers\Livewire\Components\Udalosti
 */
final class Stav extends Component
{
    /**
     * @var \Seka\Terminy\Models\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\Terminy\Models\Udalost\StavUdalosti[]
     */
    public function zoznam(): array
    {
        return $this->zoznam;
    }
}
