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

@section('content')
    @parent
    <div class="main-container">
        <section class="bg-white space-sm pb-4">
            <div class="container">
                <div class="row">
                    <div class="col">
                        <h1 class="h2 mb-2">Nový učebný materiál</h1>
                        @include('flash::message')
                    </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">
                                    <p class="nav-link active">Učebný materiál</p>
                                </li>
                                <li class="nav-item">
                                    <p class="nav-link disabled">Sekcie</p>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <section class="flush-with-above height-80 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>Detaily učebného materiálu</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.kniznica.ucebne_materialy.partials.form', ['edit' => false])
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
    @push('scripts')
    <script type="application/javascript">
        $(window).on('load', function () {
          $('#myTab a').on('click', function (e) {
            e.preventDefault()
            $(this).tab('show')
          })
        })
    </script>

    <script src="/vendor/laravel-filemanager/js/stand-alone-button.js"></script>
    <script type="application/javascript">
      $('#lfm').filemanager('file', {prefix: '/file-manager'});
    </script>
    @endpush
@endsection
