@php $base_class = 'lqd-navbar-link flex items-center gap-2 ps-navbar-link-ps pe-navbar-link-pe pt-navbar-link-pt pb-navbar-link-pb rounded-xl relative transition-colors group/link hover:bg-navbar-background-hover/5 hover:text-navbar-foreground-hover [&.active]:bg-navbar-background-active/5 [&.active]:text-navbar-foreground-active dark:[&.active]:bg-transparent dark:before:w-1.5 dark:before:h-full dark:before:absolute dark:before:top-0 dark:before:-start-2 dark:before:bg-primary dark:before:rounded-e-lg dark:before:opacity-0 dark:[&.active]:before:opacity-100'; $label_base_class = 'lqd-nav-link-label flex grow gap-2 items-center transition-[opacity,transform,visbility] [&_.lqd-nav-item-badge]:ms-auto'; $letter_icon_base_class = 'lqd-nav-link-letter-icon inline-flex size-6 shrink-0 items-center justify-center rounded-md bg-primary text-4xs text-primary-foreground'; $target = '_self'; // setting href if (!empty($href) && $href !== '#') { if (is_string($href) && Route::has($href)) { $href = !empty($slug) ? route($href, $slug) : route($href); } else { $target = '_blank'; } if ($localizeHref) { $href = LaravelLocalization::localizeUrl($href); } } // if (empty(trim($activeCondition)) && !empty($href)) { // $activeCondition = $href === url()->current(); // } if ($activeCondition) { $base_class .= ' active'; } @endphp withoutTwMergeClasses()->twMerge($base_class, $attributes->get('class')) }} href="{{ $href }}" target="{{ $target }}" @if ($dropdownTrigger) @click.prevent="toggleDropdownOpen()" @endif @if ($app_is_not_demo && ($activeCondition && !empty(trim($activeCondition)))) x-init="$el.parentElement.offsetTop > window.innerHeight && $el.closest('.lqd-navbar-inner').scrollTo({ top: (($el.parentElement.offsetHeight + $el.parentElement.offsetTop) / 2) })" @endif @if ($triggerType === 'modal') @click.prevent="toggleModal()" @endif > @if ($letterIcon && !empty($label)) twMergeFor('letter-icon', $letter_icon_base_class) }} @if (!empty($letterIconStyles)) style="{{ $letterIconStyles }}" @endif > {{ mb_substr($label, 0, 1) }} @endif @if (!empty($icon) || !empty($iconHtml)) @if (!empty($iconHtml)) {!! $iconHtml !!} @else @endif @endif @if (!empty($label)) twMergeFor('label', $label_base_class, $attributes->get('class:label')) }}> {{ $label }} @endif @if (($new && $app_is_demo) || !empty($badge)) @if ($new && $app_is_demo) {{ __('New') }} @elseif (!empty($badge)) {{ $badge }} @endif @endif @if ($dropdownTrigger) @endif