@props(['context'])
@php($authenticated = $context['kind'] !== 'guest')
@php($menuId = $authenticated ? 'tp-auth-mobile-menu' : 'tp-public-mobile-menu')
<nav class="navbar tp-topbar border-bottom bg-body-tertiary"><div class="container-fluid py-2 gap-2"><div class="tp-public-topbar d-flex align-items-center w-100 gap-2">
<x-brand-logo :href="$authenticated ? $context['panel_url'] : route('home')" height="44px" />
<div class="tp-public-desktop-actions d-none d-lg-flex align-items-center gap-2 ms-auto"><a class="btn btn-link text-decoration-none" href="{{route('earn')}}">{{__('earn.navigation')}}</a>
@if($authenticated)<a class="btn btn-link text-decoration-none" href="{{$context['panel_url']}}">{{$context['panel_label']}}</a><form method="POST" action="{{$context['logout_route']}}">@csrf<button class="btn btn-outline-secondary" type="submit">{{__('ui.sign_out')}}</button></form>
@else<a class="btn btn-link text-decoration-none" href="{{route('earn.login')}}">{{__('earn_portal.login_title')}}</a><a class="btn btn-link text-decoration-none" href="{{route('login')}}">{{__('ui.sign_in')}}</a><a class="btn btn-primary" href="{{route('register')}}">{{__('ui.register')}}</a>@endif
<x-locale-picker /><x-theme-picker /></div>
<button class="navbar-toggler tp-public-menu-toggle d-lg-none ms-auto" type="button" data-bs-toggle="offcanvas" data-bs-target="#{{$menuId}}" aria-controls="{{$menuId}}" aria-expanded="false" aria-label="{{__('navigation.open_menu')}}"><span class="navbar-toggler-icon" aria-hidden="true"></span></button>
</div></div></nav>
<div class="offcanvas offcanvas-end tp-public-mobile-menu" tabindex="-1" id="{{$menuId}}" aria-labelledby="{{$menuId}}-label"><div class="offcanvas-header"><h2 class="offcanvas-title h5" id="{{$menuId}}-label">{{__('navigation.menu')}}</h2><button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="{{__('navigation.close_menu')}}"></button></div><div class="offcanvas-body d-flex flex-column gap-3">
<a class="btn btn-link" href="{{route('earn')}}">{{__('earn.navigation')}}</a>
@if($authenticated)<a class="btn btn-primary" href="{{$context['panel_url']}}">{{$context['panel_label']}}</a><form method="POST" action="{{$context['logout_route']}}">@csrf<button class="btn btn-outline-secondary w-100" type="submit">{{__('ui.sign_out')}}</button></form>
@else<a class="btn btn-outline-primary" href="{{route('earn.login')}}">{{__('earn_portal.login_title')}}</a><a class="btn btn-outline-primary" href="{{route('login')}}">{{__('ui.sign_in')}}</a><a class="btn btn-primary" href="{{route('register')}}">{{__('ui.register')}}</a>@endif
<div class="tp-public-mobile-preferences d-flex align-items-center gap-2 pt-2 border-top" aria-label="{{__('ui.preferences')}}"><x-locale-picker /><x-theme-picker /></div></div></div>
