<?php if(config('wpbox.one_signal_app_id') && config('wpbox.one_signal_app_id',"")!=""): ?>
    <script src="https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js" defer></script>
    <script>
        window.OneSignalDeferred = window.OneSignalDeferred || [];
        OneSignalDeferred.push(function(OneSignal) {

             // Set the user ID
             setTimeout(() => {
                var userId = "<?php echo e(auth()->user()->id); ?>"; // Replace this with how you get the user ID in your project
                OneSignal.login(userId);
             }, 1000);


            OneSignal.init({
                allowLocalhostAsSecureOrigin: true,
                appId: "<?php echo e(config('wpbox.one_signal_app_id',"")); ?>",
            });

        });
    </script>

<?php endif; ?>
<?php /**PATH C:\Users\microzip\Documents\Job Eleazar Valenzuela Ortiz\Desarrollos NG\Proyectos\facturador-jmas\Sichat\modules\Wpbox\Providers/../Resources/views/chat/onesignal.blade.php ENDPATH**/ ?>