<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
    'cartCount' => 0,
    'navShops' => collect(),
]));

foreach ($attributes->all() as $__key => $__value) {
    if (in_array($__key, $__propNames)) {
        $$__key = $$__key ?? $__value;
    } else {
        $__newAttributes[$__key] = $__value;
    }
}

$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);

unset($__propNames);
unset($__newAttributes);

foreach (array_filter(([
    'cartCount' => 0,
    'navShops' => collect(),
]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
    $$__key = $$__key ?? $__value;
}

$__defined_vars = get_defined_vars();

foreach ($attributes->all() as $__key => $__value) {
    if (array_key_exists($__key, $__defined_vars)) unset($$__key);
}

unset($__defined_vars, $__key, $__value); ?>

<nav class="navbar navbar-expand-lg bg-white border-bottom sticky-top">
    <div class="container py-2">
        <a class="navbar-brand fw-bold" href="<?php echo e(route('storefront.home')); ?>" style="letter-spacing:.08em;">
            BALI ARCADE
        </a>

        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#frontendNav"
            aria-controls="frontendNav" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse" id="frontendNav">
            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                <li class="nav-item"><a class="nav-link" href="<?php echo e(route('storefront.home')); ?>">Home</a></li>
                <li class="nav-item"><a class="nav-link" href="<?php echo e(route('storefront.about')); ?>">About</a></li>
                <li class="nav-item"><a class="nav-link" href="<?php echo e(route('storefront.contact')); ?>">Contact</a></li>
            </ul>

            <div class="d-flex align-items-center gap-2">
                <?php if(auth()->guard()->check()): ?>
                    <a href="<?php echo e(route('dashboard')); ?>" class="btn btn-sm btn-outline-dark" title="Dashboard">
                        <i class="bi bi-person-circle"></i>
                    </a>
                <?php else: ?>
                    <a href="<?php echo e(route('login')); ?>" class="btn btn-sm btn-outline-dark" title="Login">
                        <i class="bi bi-person"></i>
                    </a>
                <?php endif; ?>
            </div>
        </div>
    </div>
</nav>

<div id="frontendToaster" class="toast-container position-fixed top-0 end-0 p-3" style="z-index: 1080;"></div>
<script>
    window.frontendToast = function(message, type = 'success') {
        const toaster = document.getElementById('frontendToaster');
        if (!toaster || !message) return;

        const bgClass = type === 'error' ? 'text-bg-danger' : 'text-bg-success';
        const toastEl = document.createElement('div');
        toastEl.className = `toast align-items-center border-0 ${bgClass}`;
        toastEl.role = 'status';
        toastEl.ariaLive = 'polite';
        toastEl.ariaAtomic = 'true';
        toastEl.innerHTML = `
            <div class="d-flex">
                <div class="toast-body">${message}</div>
                <button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
            </div>
        `;
        toaster.appendChild(toastEl);
        const bsToast = new bootstrap.Toast(toastEl, {
            delay: 3200
        });
        bsToast.show();
        toastEl.addEventListener('hidden.bs.toast', () => toastEl.remove());
    };

    <?php if(session('success')): ?>
        window.frontendToast(<?php echo json_encode(session('success'), 15, 512) ?>, 'success');
    <?php endif; ?>

    <?php if(session('error')): ?>
        window.frontendToast(<?php echo json_encode(session('error'), 15, 512) ?>, 'error');
    <?php endif; ?>
</script>
<?php /**PATH C:\Users\Abdur Rahman\Desktop\faa\resources\views\components\frontend\navbar.blade.php ENDPATH**/ ?>