<?php
    $waConnected  = !empty($user->access_token) && !empty($user->phone_number_id) && !empty($user->waba_id);
    $currentRoute = Route::currentRouteName();
?>
<aside>
    <a href="<?php echo e(route('user.whatsapp-setup')); ?>" style="text-decoration:none;display:block;">
    <div class="company-badge" style="<?php echo e($waConnected ? '' : 'background:linear-gradient(135deg,#7f1d1d,#dc2626);cursor:pointer;'); ?>" title="<?php echo e($waConnected ? 'WhatsApp is connected' : 'Click to connect WhatsApp'); ?>">
        <div class="cb-inner" style="flex-direction:column;gap:.2rem;">
            <div class="cb-wa-status">
                <span class="wa-dot <?php echo e($waConnected ? 'connected' : 'disconnected'); ?>"></span>
                <span style="color:#fff;">WhatsApp <?php echo e($waConnected ? 'Connected' : 'Disconnected'); ?></span>
            </div>
            <?php if(!$waConnected): ?>
            <div style="font-size:.62rem;color:rgba(255,255,255,.7);margin-top:.3rem;text-align:center;">Tap to set up →</div>
            <?php endif; ?>
        </div>
    </div>
    </a>

    <div class="nav-section-label">Main</div>
    <a href="<?php echo e(route('user.dashboard')); ?>" class="nav-item <?php echo e($currentRoute === 'user.dashboard' ? 'active' : ''); ?>">
        <i class="fas fa-home"></i> Dashboard
    </a>
    <a href="<?php echo e(route('user.inbox')); ?>" class="nav-item <?php echo e($currentRoute === 'user.inbox' || $currentRoute === 'user.inbox.conversation' ? 'active' : ''); ?>">
        <i class="fas fa-inbox"></i> Inbox
    </a>

    <div class="nav-sep"></div>
    <div class="nav-section-label">Messaging</div>
    <a href="#" class="nav-item soon"><i class="fas fa-paper-plane"></i> Send Message <span class="nav-badge">Soon</span></a>
    <a href="#" class="nav-item soon"><i class="fas fa-bullhorn"></i> Campaigns <span class="nav-badge">Soon</span></a>
    <a href="#" class="nav-item soon"><i class="fas fa-robot"></i> Reply Bot <span class="nav-badge">Soon</span></a>
    <a href="#" class="nav-item soon"><i class="fas fa-file-alt"></i> Templates <span class="nav-badge">Soon</span></a>
    <a href="#" class="nav-item soon"><i class="fas fa-users"></i> Team <span class="nav-badge">Soon</span></a>

    <div class="nav-sep"></div>
    <div class="nav-section-label">Data</div>
    <a href="#" class="nav-item soon"><i class="fas fa-address-book"></i> Contacts <span class="nav-badge">Soon</span></a>
    <a href="#" class="nav-item soon"><i class="fas fa-chart-bar"></i> Reports <span class="nav-badge">Soon</span></a>

    <div class="nav-sep"></div>
    <div class="nav-section-label">Account</div>
    <a href="<?php echo e(route('user.api-docs')); ?>" class="nav-item <?php echo e($currentRoute === 'user.api-docs' ? 'active' : ''); ?>">
        <i class="fas fa-code"></i> API Docs
    </a>
    <a href="<?php echo e(route('user.whatsapp-setup')); ?>" class="nav-item <?php echo e($currentRoute === 'user.whatsapp-setup' ? 'active' : ''); ?>">
        <i class="fab fa-whatsapp"></i> WhatsApp Setup
    </a>
    <a href="#" class="nav-item soon"><i class="fas fa-th-large"></i> Apps Control <span class="nav-badge">Soon</span></a>
    <a href="#" class="nav-item soon"><i class="fas fa-credit-card"></i> Subscription <span class="nav-badge">Soon</span></a>
    <a href="#" class="nav-item soon"><i class="fas fa-cog"></i> Settings <span class="nav-badge">Soon</span></a>
</aside>
<?php /**PATH /Applications/XAMPP/xamppfiles/htdocs/WhatsApp/whatsappcloudapi/resources/views/user/partials/sidebar.blade.php ENDPATH**/ ?>