{{--
    Logo in the middle, navigation split either side of it.

    The split is by count rather than by two separate menus, so an editor
    authors one primary menu and this style arranges it.
--}}
@php
    $allItems = app(\App\Domain\Website\Services\WebsiteMenuService::class)->tree('primary');
    $half = (int) ceil($allItems->count() / 2);
@endphp
<nav class="site-nav site-nav--solid" id="site-navbar">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        <div class="flex items-center justify-between h-20 gap-4">
            <div class="hidden lg:flex flex-1 justify-end">
                @include('website.partials.site-menu', ['menuKey' => 'primary', 'menuSlice' => ['skip' => 0, 'take' => $half]])
            </div>

            <div class="mx-6">
                @include('website.partials.site-logo')
            </div>

            <div class="hidden lg:flex flex-1 items-center gap-3">
                @include('website.partials.site-menu', ['menuKey' => 'primary', 'menuSlice' => ['skip' => $half, 'take' => 99]])
            </div>

            @include('website.navbars._actions')
        </div>
    </div>
    @include('website.navbars._mobile_menu')
</nav>
