<?php

declare(strict_types=1);

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

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

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

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

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

        return view('Terminy::pages.backend.adresar.upravit', compact('miesto'));
    }
}
