<section class="flush-with-above height-80 d-block">
    <div class="tab-content">
        <div class="tab-pane active" role="tabpanel">
            <div class="container">
                <div class="row mb-4">
                    <div class="col">
                        <h5>
                            Máte <b>{{ $userNotifications->count() }}</b> neprečítané upozornenia!
                        </h5>
                    </div>
                    <div class="col">
                        <a href="" class="btn btn-primary float-right">
                            <span class="icon-check"></span>
                            Označiť všetky ako prečítané
                        </a>
                    </div>
                </div>
                <div class="row">
                    <div class="col">
                        @if($userNotifications->isEmpty())
                            <div class="alert alert-primary">
                                <i class="icon-info mr-1"></i>
                                Nemáte žiadne neprečítané upozornenie...
                            </div>
                        @else
                            <div class="table-responsive">
                                <table class="table table-borderless table-hover align-items-center">
                                    <thead>
                                    <tr>
                                        <th scope="col">Akcia</th>
                                        <th scope="col">Značka</th>
                                        <th scope="col">Časová značka vykonania</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    @foreach($userNotifications as $notification)
                                        <tr class="bg-white">
                                            <th scope="row">
                                                {{ $notification->type }}
                                            </th>
                                            <td class="text-left">
                                                @dump($notification->data)
                                            </td>
                                            <td class="text-left">
                                                {{ $notification->created_at->format('d.m.Y H:i:s') }}
                                            </td>
                                        </tr>
                                    @endforeach
                                    </tbody>
                                </table>
                            </div>
                        @endif
                    </div>
                </div>
{{--                @if(!$userNotifications->isEmpty() && $userNotifications->hasPages())--}}
{{--                    <div class="row">--}}
{{--                        <div class="col-12 d-flex justify-content-center">--}}
{{--                            {{ $userNotifications->onEachSide(25)->links() }}--}}
{{--                        </div>--}}
{{--                    </div>--}}
{{--                @endif--}}
            </div>
        </div>
    </div>
</section>