<aside class="app-sidebar p-2">
    <div class="brand d-flex align-items-center gap-2">
        <?php if(company_logo_url()): ?>
            <img src="<?php echo e(company_logo_url()); ?>" alt="<?php echo e($companyName ?? setting('company_name')); ?>" style="max-height:36px;max-width:120px;object-fit:contain">
        <?php else: ?>
            <i class="bi bi-broadcast-pin fs-4 text-info"></i>
        <?php endif; ?>
        <span><?php echo e($companyName ?? setting('company_name', __('messages.app_name'))); ?></span>
    </div>
    <nav class="mt-3 d-grid gap-1">
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('dashboard.view')): ?>
            <a href="<?php echo e(route('dashboard')); ?>" class="<?php echo e(request()->routeIs('dashboard') ? 'active' : ''); ?>"><i class="bi bi-speedometer2"></i> <?php echo e(__('nav.dashboard')); ?></a>
        <?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('billing.view')): ?>
            <a href="<?php echo e(route('billing.index')); ?>" class="<?php echo e(request()->routeIs('billing.*') ? 'active' : ''); ?>"><i class="bi bi-cash-coin"></i> <?php echo e(__('nav.billing')); ?></a>
        <?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('overdue.view')): ?>
            <a href="<?php echo e(route('overdue.index')); ?>" class="<?php echo e(request()->routeIs('overdue.*') ? 'active' : ''); ?>"><i class="bi bi-exclamation-triangle"></i> <?php echo e(__('nav.overdue')); ?></a>
        <?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('cash.view')): ?>
            <a href="<?php echo e(route('cash.index')); ?>" class="<?php echo e(request()->routeIs('cash.*') ? 'active' : ''); ?>"><i class="bi bi-safe"></i> <?php echo e(__('nav.cash')); ?></a>
        <?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('invoices.view')): ?>
            <a href="<?php echo e(route('invoices.index')); ?>" class="<?php echo e(request()->routeIs('invoices.*') ? 'active' : ''); ?>"><i class="bi bi-file-earmark-text"></i> <?php echo e(__('nav.invoices')); ?></a>
        <?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('lines.view')): ?>
            <a href="<?php echo e(route('lines.index')); ?>" class="<?php echo e(request()->routeIs('lines.*') ? 'active' : ''); ?>"><i class="bi bi-sim"></i> <?php echo e(__('nav.lines')); ?></a>
        <?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('customers.view')): ?>
            <a href="<?php echo e(route('customers.index')); ?>" class="<?php echo e(request()->routeIs('customers.*') ? 'active' : ''); ?>"><i class="bi bi-people"></i> <?php echo e(__('nav.customers')); ?></a>
        <?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('plans.view')): ?>
            <a href="<?php echo e(route('plans.index')); ?>" class="<?php echo e(request()->routeIs('plans.*') ? 'active' : ''); ?>"><i class="bi bi-collection"></i> <?php echo e(__('nav.plans')); ?></a>
        <?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('sales.create')): ?>
            <a href="<?php echo e(route('sales.create')); ?>" class="<?php echo e(request()->routeIs('sales.create') ? 'active' : ''); ?>"><i class="bi bi-bag-plus"></i> <?php echo e(__('nav.new_sale')); ?></a>
        <?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('sales.view')): ?>
            <a href="<?php echo e(route('sales.index')); ?>" class="<?php echo e(request()->routeIs('sales.index') || request()->routeIs('sales.show') ? 'active' : ''); ?>"><i class="bi bi-receipt"></i> <?php echo e(__('nav.sales')); ?></a>
        <?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('reports.view')): ?>
            <a href="<?php echo e(route('reports.index')); ?>" class="<?php echo e(request()->routeIs('reports.*') ? 'active' : ''); ?>"><i class="bi bi-bar-chart"></i> <?php echo e(__('nav.reports')); ?></a>
        <?php endif; ?>

        <div class="nav-group-title"><?php echo e(__('nav.settings')); ?></div>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('companies.view')): ?><a href="<?php echo e(route('companies.index')); ?>" class="<?php echo e(request()->routeIs('companies.*') ? 'active' : ''); ?>"><i class="bi bi-building"></i> <?php echo e(__('nav.companies')); ?></a><?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('accounts.view')): ?><a href="<?php echo e(route('main-accounts.index')); ?>" class="<?php echo e(request()->routeIs('main-accounts.*') || request()->routeIs('sub-accounts.*') ? 'active' : ''); ?>"><i class="bi bi-diagram-3"></i> <?php echo e(__('nav.accounts')); ?></a><?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('users.view')): ?><a href="<?php echo e(route('users.index')); ?>" class="<?php echo e(request()->routeIs('users.*') ? 'active' : ''); ?>"><i class="bi bi-person-gear"></i> <?php echo e(__('nav.users')); ?></a><?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('roles.view')): ?><a href="<?php echo e(route('roles.index')); ?>" class="<?php echo e(request()->routeIs('roles.*') ? 'active' : ''); ?>"><i class="bi bi-shield-lock"></i> <?php echo e(__('nav.roles')); ?></a><?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('settings.view')): ?><a href="<?php echo e(route('settings.index')); ?>" class="<?php echo e(request()->routeIs('settings.*') ? 'active' : ''); ?>"><i class="bi bi-gear"></i> <?php echo e(__('nav.settings')); ?></a><?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('audit.view')): ?><a href="<?php echo e(route('audit.index')); ?>" class="<?php echo e(request()->routeIs('audit.*') ? 'active' : ''); ?>"><i class="bi bi-journal-text"></i> <?php echo e(__('nav.audit')); ?></a><?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('updates.view')): ?><a href="<?php echo e(route('system.update')); ?>" class="<?php echo e(request()->routeIs('system.update*') ? 'active' : ''); ?>"><i class="bi bi-arrow-repeat"></i> <?php echo e(__('nav.updates')); ?></a><?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('backups.view')): ?><a href="<?php echo e(route('system.backups')); ?>" class="<?php echo e(request()->routeIs('system.backups*') ? 'active' : ''); ?>"><i class="bi bi-cloud-arrow-down"></i> <?php echo e(__('nav.backups')); ?></a><?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('health.view')): ?><a href="<?php echo e(route('system.health')); ?>" class="<?php echo e(request()->routeIs('system.health') ? 'active' : ''); ?>"><i class="bi bi-heart-pulse"></i> <?php echo e(__('nav.health')); ?></a><?php endif; ?>
    </nav>
</aside>
<?php /**PATH D:\laragon\www\esim\resources\views/partials/sidebar.blade.php ENDPATH**/ ?>