<!--Tabs navigation-->
<ul class="-mb-6 flex list-none flex-row flex-wrap border-b-0 pl-0 relative z-10" role="tablist" data-te-nav-ref>
    <li role="presentation" class="flex-auto text-center">
        <a href="#tabs-most-views"
            class="rounded-l-xl my-2 block border-x-0 border-b-2 border-t-0 border-transparent px-7 pb-3.5 pt-4 text-xs font-medium uppercase leading-tight text-neutral-500 hover:isolate hover:border-transparent hover:bg-neutral-50 focus:isolate focus:border-transparent data-[te-nav-active]:border-rose-600 data-[te-nav-active]:text-black dark:text-neutral-400 bg-white dark:bg-neutral-900 dark:hover:bg-neutral-800 dark:data-[te-nav-active]:text-white"
            data-te-toggle="pill" data-te-target="#tabs-most-views" data-te-nav-active role="tab"
            aria-controls="tabs-most-views" aria-selected="true">
            {{ __('home.most-views') }}
        </a>
    </li>
    <li role="presentation" class="flex-auto text-center">
        <a href="#tabs-most-likes"
            class="my-2 block border-x-0 border-b-2 border-t-0 border-transparent px-7 pb-3.5 pt-4 text-xs font-medium uppercase leading-tight text-neutral-500 hover:isolate hover:border-transparent hover:bg-neutral-50 focus:isolate focus:border-transparent data-[te-nav-active]:border-rose-600 data-[te-nav-active]:text-black dark:text-neutral-400 bg-white dark:bg-neutral-900 dark:hover:bg-neutral-800 dark:data-[te-nav-active]:text-white"
            data-te-toggle="pill" data-te-target="#tabs-most-likes" role="tab" aria-controls="tabs-most-likes"
            aria-selected="false">
            {{ __('home.most-likes') }}
        </a>
    </li>
    <li role="presentation" class="flex-auto text-center">
        <a href="#tabs-popular-weekly"
            class="my-2 block border-x-0 border-b-2 border-t-0 border-transparent px-7 pb-3.5 pt-4 text-xs font-medium uppercase leading-tight text-neutral-500 hover:isolate hover:border-transparent hover:bg-neutral-50 focus:isolate focus:border-transparent data-[te-nav-active]:border-rose-600 data-[te-nav-active]:text-black dark:text-neutral-400 bg-white dark:bg-neutral-900 dark:hover:bg-neutral-800 dark:data-[te-nav-active]:text-white"
            data-te-toggle="pill" data-te-target="#tabs-popular-weekly" role="tab"
            aria-controls="tabs-popular-weekly" aria-selected="false">
            {{ __('home.popular-weekly') }}
        </a>
    </li>
    <li role="presentation" class="flex-auto text-center">
        <a href="#tabs-popular-monthly"
            class="rounded-r-xl my-2 block border-x-0 border-b-2 border-t-0 border-transparent px-7 pb-3.5 pt-4 text-xs font-medium uppercase leading-tight text-neutral-500 hover:isolate hover:border-transparent hover:bg-neutral-50 focus:isolate focus:border-transparent data-[te-nav-active]:border-rose-600 data-[te-nav-active]:text-black dark:text-neutral-400 bg-white dark:bg-neutral-900 dark:hover:bg-neutral-800 dark:data-[te-nav-active]:text-white"
            data-te-toggle="pill" data-te-target="#tabs-popular-monthly" role="tab"
            aria-controls="tabs-popular-monthly" aria-selected="false">
            {{ __('home.popular-monthly') }}
        </a>
    </li>
</ul>

@php $isThumbnail = true; @endphp

@auth
    @if (!Auth::user()->home_middle_design)
        @php $isThumbnail = false; @endphp
    @endif
@endauth

<!--Tabs content-->
<div class="mb-6">
    <div class="hidden opacity-100 transition-opacity duration-150 ease-linear data-[te-tab-active]:block"
        id="tabs-most-views" role="tabpanel" aria-labelledby="tabs-most-views-tab" data-te-tab-active>
        @include('home.partials.tab.template', [
            'episodes' => $popularAllTime,
            'isThumbnail' => $isThumbnail,
        ])
        <div class="grid text-center pt-5 ">
            <a href="{{ route('hentai.search', ['order' => 'view-count']) }}"
                class="rounded bg-rose-600 p-1 mr-2 text-xs font-medium uppercase leading-normal text-white transition duration-150 ease-in-out hover:bg-rose-700 focus:bg-rose-600">
                <i class="fa-solid fa-magnifying-glass"></i> {{ __('home.show-more-with-most-views') }}
            </a>
        </div>
    </div>
    <div class="hidden opacity-0 transition-opacity duration-150 ease-linear data-[te-tab-active]:block"
        id="tabs-most-likes" role="tabpanel" aria-labelledby="tabs-most-likes-tab">
        @include('home.partials.tab.template', [
            'episodes' => $mostLikes,
            'isThumbnail' => $isThumbnail,
        ])
        <div class="grid text-center pt-5 ">
            <a href="{{ route('hentai.search', ['order' => 'view-count']) }}"
                class="rounded invisible bg-rose-600 p-1 mr-2 text-xs font-medium uppercase leading-normal text-white transition duration-150 ease-in-out hover:bg-rose-700 focus:bg-rose-600">
                <i class="fa-solid fa-magnifying-glass"></i> {{ __('home.show-more') }}
            </a>
        </div>
    </div>
    <div class="hidden opacity-0 transition-opacity duration-150 ease-linear data-[te-tab-active]:block"
        id="tabs-popular-weekly" role="tabpanel" aria-labelledby="tabs-popular-weekly-tab">
        @include('home.partials.tab.template', [
            'episodes' => $popularWeekly,
            'isThumbnail' => $isThumbnail,
            'popularView' => true,
        ])
        <div class="grid text-center pt-5 ">
            <a href="{{ route('hentai.search', ['order' => 'recently-released']) }}"
                class="rounded invisible bg-rose-600 p-1 mr-2 text-xs font-medium uppercase leading-normal text-white transition duration-150 ease-in-out hover:bg-rose-700 focus:bg-rose-600">
                <i class="fa-solid fa-magnifying-glass"></i> {{ __('home.show-more') }}
            </a>
        </div>
    </div>
    <div class="hidden opacity-0 transition-opacity duration-150 ease-linear data-[te-tab-active]:block"
        id="tabs-popular-monthly" role="tabpanel" aria-labelledby="tabs-popular-monthly-tab">
        @include('home.partials.tab.template', [
            'episodes' => $popularMonthly,
            'isThumbnail' => $isThumbnail,
            'popularView' => true,
        ])
        <div class="grid text-center pt-5 ">
            <a href="{{ route('hentai.search', ['order' => 'recently-released']) }}"
                class="rounded invisible bg-rose-600 p-1 mr-2 text-xs font-medium uppercase leading-normal text-white transition duration-150 ease-in-out hover:bg-rose-700 focus:bg-rose-600">
                <i class="fa-solid fa-magnifying-glass"></i> {{ __('home.show-more') }}
            </a>
        </div>
    </div>
</div>
