@if($aktualnaOdporucanaInformacia != null)
    <div class="card shadow">
        <div class="card-header">
            <div class="row align-content-between">
                <div class="col">
                    <h5>Odporúčané informácie</h5>
                </div>
                <div class="col">
                    <a class="btn btn-primary float-right" role="button"
                       href="{{ route('portal.informacie.index') }}">Zobraziť
                        všetky
                        informácie
                    </a>
                </div>
            </div>
        </div>
        <div class="card-body p-0">
            @if(count($aktualnaOdporucanaInformacia) == 0)
                <p class="alert alert-primary text-small text-center m-2">
                    <i class="icon-info mr-2"></i>
                    Aktuálne nie je zverejnená žiadna odporúčaná informácia
                </p>
            @else
                <div id="carouselInformations" class="carousel slide" data-ride="carousel">
                    <ol class="carousel-indicators">
                        @foreach($aktualnaOdporucanaInformacia as $informacia)
                            <li data-target="#carouselInformations" data-slide-to="{{$loop->index}}"
                                class="bg-primary @if($loop->first) active @endif"></li>
                        @endforeach
                    </ol>
                    <div class="carousel-inner">
                        @foreach($aktualnaOdporucanaInformacia as $informacia)
                            <div class="carousel-item bg-light @if($loop->first) active @endif">
                                <a class="d-block w-100 p-4"
                                   href="{{ route('portal.informacie.show', $informacia) }}">
                                    <blockquote class="blockquote text-center w-75 mx-auto">
                                        <p class="mb-0 text-truncate">{{ $informacia->titulok }}</p>
                                        <footer class="blockquote-footer text-truncate">{{ $informacia->uvod }}</footer>
                                    </blockquote>
                                </a>
                            </div>
                        @endforeach
                    </div>
                    <a class="carousel-control-prev" href="#carouselInformations" role="button" data-slide="prev">
                        <span class="icon-left-open bg-primary step-circle step-circle-sm" aria-hidden="true"></span>
                        <span class="sr-only">Previous</span>
                    </a>
                    <a class="carousel-control-next" href="#carouselInformations" role="button" data-slide="next">
                        <span class="icon-right-open bg-primary step-circle step-circle-sm" aria-hidden="true"></span>
                        <span class="sr-only">Next</span>
                    </a>
                </div>
            @endif
        </div>
    </div>
@endif