<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Inbox — <?php echo e(\App\Models\Setting::get('project_name', 'WhatsApp')); ?></title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
    <?php echo app('Illuminate\Foundation\Vite')(['resources/css/app.css', 'resources/js/inbox.js']); ?>
    <style>
        * { margin: 0; padding: 0; box-sizing: border-box; }
        html, body { height: 100%; overflow: hidden; background: #0b141a; }
        #inbox-app { height: 100vh; width: 100vw; display: flex; }
    </style>
</head>
<body>

<?php
    $waConnected = !empty($user->access_token) && !empty($user->phone_number_id) && !empty($user->waba_id);
    $appLogo     = \App\Models\Setting::get('app_logo', '');
    $hasLogo     = $appLogo && file_exists(public_path('uploads/' . $appLogo));
    $logoUrl     = $hasLogo ? asset('uploads/' . $appLogo) : '';
?>

<script>
window.InboxConfig = {
    userId:        <?php echo e(auth()->id()); ?>,
    userName:      <?php echo json_encode($user->name, 15, 512) ?>,
    pusherKey:     <?php echo json_encode($pusherKey, 15, 512) ?>,
    pusherCluster: <?php echo json_encode($pusherCluster, 15, 512) ?>,
    csrfToken:     <?php echo json_encode(csrf_token(), 15, 512) ?>,
    waConnected:   <?php echo e($waConnected ? 'true' : 'false'); ?>,
    logoUrl:       <?php echo json_encode($logoUrl, 15, 512) ?>,
    routes: {
        dashboard: <?php echo json_encode(route('user.dashboard'), 15, 512) ?>,
        setup:     <?php echo json_encode(route('user.whatsapp-setup'), 15, 512) ?>,
        apiDocs:   <?php echo json_encode(route('user.api-docs'), 15, 512) ?>,
        logout:    <?php echo json_encode(route('logout'), 15, 512) ?>,
    },
};
</script>

<div id="inbox-app"></div>

</body>
</html>
<?php /**PATH /Applications/XAMPP/xamppfiles/htdocs/WhatsApp/whatsappcloudapi/resources/views/user/inbox.blade.php ENDPATH**/ ?>