<?php

declare(strict_types=1);

namespace Seka\Portal\Modul\Terminy\Http\Controllers\Backend;

use Illuminate\Contracts\View\View;
use Seka\Portal\Modul\Terminy\Entities\MoznostiUdalosti\MoznostUdalosti;
use Seka\Portal\Modul\Terminy\Http\Controllers\Controller;

/**
 * Class MoznostiUdalostiController
 *
 * @package Seka\Portal\Modul\Terminy\Http\Controllers\Backend
 */
final class MoznostiUdalostiController extends Controller
{
    /**
     * @throws \Illuminate\Contracts\Container\BindingResolutionException
     */
    public function index(): View
    {
        return view('Terminy::pages.backend.moznosti-udalosti.index');
    }

    /**
     * @throws \Illuminate\Contracts\Container\BindingResolutionException
     */
    public function create(): View
    {
        return view('Terminy::pages.backend.moznosti-udalosti.nove');
    }

    /**
     * @throws \Illuminate\Contracts\Container\BindingResolutionException
     */
    public function edit(int $id): View
    {
        $moznostUdalosti = MoznostUdalosti::withTrashed()->findOrFail($id);

        return view('Terminy::pages.backend.moznosti-udalosti.upravit', compact('moznostUdalosti'));
    }
}
