<?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\DruhUdalosti;

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

    /**
     * @throws \ReflectionException
     */
    public function mount(): void
    {
        $this->zoznam = DruhUdalosti::toArray();
    }
    
    /**
     * @return \Illuminate\Contracts\View\View
     * @throws \Illuminate\Contracts\Container\BindingResolutionException
     */
    public function render(): View
    {
        return view('Terminy::components.livewire.udalosti.druh');
    }

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