@extends('Vzdelavanie::layout.integrated')

@section('content')
    @parent
    <section class="bg-white pb-4">
        <div class="container">
            <div class="row">
                <div class="col">
                    <h1 class="h2 mb-2">Upraviť otázku testu</h1>
                    <span>"{{ $test->nazov }}"</span>
                </div>
            </div>
        </div>
    </section>

    <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" href="{{ route('vzdelavanie.sprava.testovanie.testy.edit', $test) }}">Test</a>
                            </li>
                            <li class="nav-item">
                                <p class="nav-link active">Otázka</p>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="{{ route('vzdelavanie.sprava.testovanie.testy.otazky.odpovede.index', [$test, $otazka]) }}">
                                    Odpovede
                                    <span class="badge badge-light">{{ $otazka->odpovede->count() }}</span>
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <section class="flush-with-above d-block">
        <div class="tab-content">
            <div class="tab-pane fade show active">
                <div class="container">
                    <div class="row mb-4">
                        <div class="col">
                            <h5>Detail otázky</h5>
                        </div>
                    </div>
                    @if($errors->any())
                        <div class="row">
                            <div class="col-12">
                                <div class="alert alert-danger text-small" role="alert">
                                    <i class="icon-shield mr-2"></i>
                                    <span>Skontrolujte si prosím zadané údaje, niečo nie je v poriadku.</span>
                                </div>
                            </div>
                        </div>
                    @endif
                    <div class="row">
                        <div class="col-12">
                            @include('Vzdelavanie::pages.sprava.testovanie.otazky.partials.form', ['edit' => true])
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
@endsection