<div class="col-xxl-6">
    <!--begin::Row-->

    <!--end::Row-->
    <!--begin::Table widget 1-->
    <div class="card card-flush mb-xxl-10">
        <!--begin::Header-->
        <div class="card-header pt-5">
            <!--begin::Title-->
            <h3 class="card-title align-items-start flex-column">
                <span class="card-label fw-bold text-dark">Monthly Report</span>
                <span class="text-gray-400 pt-2 fw-semibold fs-6">{{\Carbon\Carbon::now()->format('F-Y')}}</span>
            </h3>
            <!--end::Title-->
        </div>
        <!--end::Header-->
        <!--begin::Body-->
        <div class="card-body">
            <!--begin::Nav-->
            <ul class="nav nav-pills nav-pills-custom mb-3" role="tablist">
                @foreach($governorates as $k => $gov)
                <!--begin::Item-->
                <li class="nav-item mb-3 me-3 me-lg-6" role="presentation">
                    <!--begin::Link-->
                    <a class="nav-link d-flex justify-content-between flex-column flex-center overflow-hidden @if($k == 0) active @endif w-80px h-85px py-4" data-bs-toggle="pill" href="#kt_stats_widget_1_tab_{{$k+1}}" @if($k == 0) aria-selected="true" @else aria-selected="false" @endif role="tab">
                        <!--begin::Icon-->
{{--                        <div class="nav-icon">--}}
{{--                            <img alt="" src="assets/media/svg/brand-logos/beats-electronics.svg" class="">--}}
{{--                        </div>--}}
                        <!--end::Icon-->
                        <!--begin::Subtitle-->
                        <span class="nav-text text-gray-700 fw-bold fs-6 lh-1">{{$gov->defaultLang->name}}</span>
                        <!--end::Subtitle-->
                        <!--begin::Bullet-->
                        <span class="bullet-custom position-absolute bottom-0 w-100 h-4px bg-{{$colors[$k+1]['class']}}"></span>
                        <!--end::Bullet-->
                    </a>
                    <!--end::Link-->
                </li>
                <!--end::Item-->
                @endforeach
            </ul>
            <!--end::Nav-->
            <!--begin::Tab Content-->
            <div class="tab-content">
                @foreach($governorates as $k => $gov)
                <!--begin::Tap pane-->
                <div class="tab-pane fade @if($k == 0) show active @endif" id="kt_stats_widget_1_tab_{{$k+1}}" role="tabpanel">
                    <!--begin::Table container-->
                    <div class="table-responsive">
                        <!--begin::Table-->
                        <table class="table align-middle gs-0 gy-4 my-0">
                            <!--begin::Table head-->
                            <thead>
                                <tr class="fs-7 fw-bold text-gray-500">
                                    <th class="p-0 min-w-150px d-block pt-3">Employee</th>
                                    <th class="text-end min-w-140px pt-3">STATUS</th>
{{--                                    <th class="pe-0 text-end min-w-120px pt-3">CONVERSION</th>--}}
                                </tr>
                            </thead>
                            <!--end::Table head-->
                            <!--begin::Table body-->
                            <tbody>
                            <tr>
                                <td>
                                    <a href="#" class="text-gray-800 fw-bold text-hover-primary mb-1 fs-6">
                                        @if(key_exists($gov->id, $data) && key_exists('most_attendance', $data[$gov->id]) && $data[$gov->id]['most_attendance'] != null)
                                            {{\App\Models\User::getDecryptedData(\App\Models\User::find($data[$gov->id]['most_attendance'])->full_name)}}
                                        @else
                                            @lang("No Data")
                                        @endif
                                    </a>
                                </td>
                                <td class="text-end">
                                    <span class="badge badge-light-primary fs-7 fw-bold">@lang("Most Attended")</span>
                                </td>
                                <td class="text-end">
                                    <span class="text-gray-800 fw-bold d-block fs-6"></span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <a href="#" class="text-gray-800 fw-bold text-hover-primary mb-1 fs-6">
                                        @if(key_exists($gov->id, $data) && key_exists('less_attendance', $data[$gov->id]) && $data[$gov->id]['less_attendance'] != null)
                                            {{\App\Models\User::getDecryptedData(\App\Models\User::find($data[$gov->id]['less_attendance'])->full_name)}}
                                        @else
                                            @lang("No Data")
                                        @endif
                                    </a>
                                </td>
                                <td class="text-end">
                                    <span class="badge badge-light-primary fs-7 fw-bold">Less Attended</span>
                                </td>
                                <td class="text-end">
                                    <span class="text-gray-800 fw-bold d-block fs-6"></span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <a href="#" class="text-gray-800 fw-bold text-hover-primary mb-1 fs-6">
                                        @if(key_exists($gov->id, $data) && key_exists('most_online', $data[$gov->id]) && $data[$gov->id]['most_online'] != null)
                                            {{\App\Models\User::getDecryptedData(\App\Models\User::find($data[$gov->id]['most_online'])->full_name)}}
                                        @else
                                            @lang("No Data")
                                        @endif
                                    </a>
                                </td>
                                <td class="text-end">
                                    <span class="badge badge-light-success fs-7 fw-bold">@lang("Most Online")</span>
                                </td>
                                <td class="text-end">
                                    <span class="text-gray-800 fw-bold d-block fs-6"></span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <a href="#" class="text-gray-800 fw-bold text-hover-primary mb-1 fs-6">
                                        @if(key_exists($gov->id, $data) && key_exists('less_online', $data[$gov->id]) && $data[$gov->id]['less_online'] != null)
                                            {{\App\Models\User::getDecryptedData(\App\Models\User::find($data[$gov->id]['less_online'])->full_name)}}
                                        @else
                                            @lang("No Data")
                                        @endif
                                    </a>
                                </td>
                                <td class="text-end">
                                    <span class="badge badge-light-success fs-7 fw-bold">Less Online</span>
                                </td>
                                <td class="text-end">
                                    <span class="text-gray-800 fw-bold d-block fs-6"></span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <a href="#" class="text-gray-800 fw-bold text-hover-primary mb-1 fs-6">
                                        @if(key_exists($gov->id, $data) && key_exists('most_offline', $data[$gov->id]) && $data[$gov->id]['most_offline'] != null)
                                            {{\App\Models\User::getDecryptedData(\App\Models\User::find($data[$gov->id]['most_offline'])->full_name)}}
                                        @else
                                            @lang("No Data")
                                        @endif
                                    </a>
                                </td>
                                <td class="text-end">
                                    <span class="badge badge-danger fs-7 fw-bold">@lang("Most Offline")</span>
                                </td>
                                <td class="text-end">
                                    <span class="text-gray-800 fw-bold d-block fs-6"></span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <a href="#" class="text-gray-800 fw-bold text-hover-primary mb-1 fs-6">
                                        @if(key_exists($gov->id, $data) && key_exists('less_offline', $data[$gov->id]) && $data[$gov->id]['less_offline'] != null)
                                            {{\App\Models\User::getDecryptedData(\App\Models\User::find($data[$gov->id]['less_offline'])->full_name)}}
                                        @else
                                            @lang("No Data")
                                        @endif
                                    </a>
                                </td>
                                <td class="text-end">
                                    <span class="badge badge-danger fs-7 fw-bold">Less Offline</span>
                                </td>
                                <td class="text-end">
                                    <span class="text-gray-800 fw-bold d-block fs-6"></span>
                                </td>
                            </tr>
{{--                            <tr>--}}
{{--                                <td>--}}
{{--                                    <a href="#" class="text-gray-800 fw-bold text-hover-primary mb-1 fs-6">2022 Spring Conference by Beats</a>--}}
{{--                                </td>--}}
{{--                                <td class="text-end">--}}
{{--                                    <span class="badge badge-light-success fs-7 fw-bold">Sent</span>--}}
{{--                                </td>--}}
{{--                                <td class="text-end">--}}
{{--                                    <span class="text-gray-800 fw-bold d-block fs-6">37%(247)</span>--}}
{{--                                </td>--}}
{{--                            </tr>--}}
{{--                            <tr>--}}
{{--                                <td>--}}
{{--                                    <a href="#" class="text-gray-800 fw-bold text-hover-primary mb-1 fs-6">Best Headsets Giveaway</a>--}}
{{--                                </td>--}}
{{--                                <td class="text-end">--}}
{{--                                    <span class="badge badge-light-warning fs-7 fw-bold">In Queue</span>--}}
{{--                                </td>--}}
{{--                                <td class="text-end">--}}
{{--                                    <span class="text-gray-800 fw-bold d-block fs-6">0%(0)</span>--}}
{{--                                </td>--}}
{{--                            </tr>--}}
                            </tbody>
                            <!--end::Table body-->
                        </table>
                        <!--end::Table-->
                    </div>
                    <!--end::Table container-->
                </div>
                <!--end::Tap pane-->
                @endforeach
            </div>
            <!--end::Tab Content-->
        </div>
        <!--end: Card Body-->
    </div>
    <!--end::Table widget 1-->
</div>
