<div class="m-0 p-0">
    <section class="bg-white space-sm">
        <div class="container">
            <div class="row justify-content-between align-items-center">
                <div class="col-auto">
                    <h1 class="h2 mb-2">Upraviť udalosť</h1>
                    <span>Upraviť existujúcu udalosť</span>
                    @include('flash::message')
                </div>
                <div class="col-auto text-right">
                    <a href="{{ route('modul.terminy.frontend.udalosti.udalost.show', $udalost) }}"
                       class="btn btn-primary">Zobraziť udalosť</a>
                </div>
            </div>
        </div>
    </section>

    @if($udalost->je_dostupna_registracia)
        <section class="flush-with-above space-0">
            <div class="bg-white">
                <div class="container">
                    <div class="row">
                        <div class="col">
                            <ul class="nav nav-tabs" id="myTab" role="tablist">
                                <li class="nav-item">
                                    <a class="nav-link active" href="" role="tab">Udalosť</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link"
                                       href="{{ route('modul.terminy.backend.udalosti.udalost.moznosti.index', $udalost) }}"
                                       role="tab">Možnosti</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link"
                                       href="{{ route('modul.terminy.backend.udalosti.udalost.registracie.index', $udalost) }}"
                                       role="tab"
                                    >
                                        Registrácie
                                        <span class="badge badge-light">{{ $udalost->registracie()->count() }}</span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    @endif

    <section class="flush-with-above">
        <div class="tab-content">
            <div class="tab-pane fade show active" role="tabpanel">
                <div class="container">
                    <div class="row">
                        <div class="col-12">
                            <livewire:Terminy.backend.udalosti.components.form :udalost="$udalost"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
