<?php

declare(strict_types=1);

namespace Seka\Portal\Modul\Terminy\Http\Controllers\Backend\MoznostiUdalosti\Livewire\Pages;

use Livewire\Component;
use Illuminate\Contracts\View\View;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Seka\Portal\Modul\Terminy\Entities\MoznostiUdalosti\MoznostUdalosti;

/**
 * Class Nove
 *
 * @package Seka\Portal\Modul\Terminy\Http\Controllers\Backend\MoznostiUdalosti\Livewire\Pages
 */
final class Nove extends Component
{
    use AuthorizesRequests;

    /**
     * @var \Seka\Portal\Modul\Terminy\Entities\MoznostiUdalosti\MoznostUdalosti
     */
    public MoznostUdalosti $moznostUdalosti;

    /**
     * @param \Seka\Portal\Modul\Terminy\Entities\MoznostiUdalosti\MoznostUdalosti $moznostUdalosti
     */
    public function mount(MoznostUdalosti $moznostUdalosti): void
    {
        $this->moznostUdalosti = $moznostUdalosti;
    }

    /**
     * @return \Illuminate\Contracts\View\View
     * @throws \Illuminate\Auth\Access\AuthorizationException
     * @throws \Illuminate\Contracts\Container\BindingResolutionException
     */
    public function render(): View
    {
        $this->authorize('terminy');

        return view('Terminy::pages.moznostiUdalosti.backend.livewire.nove');
    }
}
