<?php
$hasActiveLicense = true;
if(isLoggedIn() and (request()->route()->getName() != 'manage.configuration.product_registration') and (!getAppSettings('product_registration', 'registration_id') or sha1(array_get($_SERVER, 'HTTP_HOST', '') . getAppSettings('product_registration', 'registration_id')) !== getAppSettings('product_registration', 'signature'))) {
    $hasActiveLicense = true;
    
}
?>
<!DOCTYPE html>
<html lang="<?php echo e(str_replace('_', '-', app()->getLocale())); ?>" dir="<?php echo e($CURRENT_LOCALE_DIRECTION); ?>">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
    <title> <?php echo e((isset($title) and $title) ? $title : __tr('Welcome')); ?> - <?php echo e(getAppSettings('name')); ?></title>
    <!-- Favicon -->
    <link href="<?php echo e(getAppSettings('favicon_image_url')); ?>" rel="icon">
    <!-- Fonts -->
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
    <?php echo $__env->yieldPushContent('head'); ?>
    <?php echo __yesset(
    [
    // Icons
    'static-assets/packages/fontawesome/css/all.css',
    'dist/css/common-vendorlibs.css',
    'dist/css/vendorlibs.css',
    'argon/css/argon.min.css',
    'dist/css/app.css',
    ]); ?>

    
</head>

<body class="<?php if(isLoggedIn()): ?> lw-authenticated-page <?php else: ?> lw-guest-page <?php endif; ?> <?php echo e($class ?? ''); ?>" x-cloak x-data="{disableSoundForMessageNotification:<?php echo e(getVendorSettings('is_disabled_message_sound_notification') ? 1 : 0); ?>}">
    <?php if(auth()->guard()->check()): ?>
    <?php echo $__env->make('layouts.navbars.sidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php endif; ?>

    <div class="main-content">
        <?php echo $__env->make('layouts.navbars.navbar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            <?php if($hasActiveLicense): ?>
            <?php echo $__env->yieldContent('content'); ?>
            <?php else: ?>
            <div class="container">
                <div class="row">
                    <div class="col-12 my-5 py-5 text-center">
                       <div class="card my-5 p-5">
                        <i class="fas fa-exclamation-triangle fa-6x mb-4 text-warning"></i>
                        <div class="alert alert-danger my-5">
                            <?php echo e(__tr('Product has not been verified yet, please contact via profile or product page.')); ?>

                        </div>
                       </div>
                    </div>
                </div>
            </div>
            <?php endif; ?>
    </div>
    <?php if(auth()->guard()->guest()): ?>
    <?php echo $__env->make('layouts.footers.guest', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php endif; ?>
    <?= __yesset(['dist/js/common-vendorlibs.js','dist/js/vendorlibs.js', 'argon/bootstrap/dist/js/bootstrap.bundle.min.js', 'argon/js/argon.js'], true) ?>
    <?php echo $__env->yieldPushContent('js'); ?>
 <template x-if="!disableSoundForMessageNotification">
    <audio id="lwMessageAlertTone">
        <source src="<?= asset('/static-assets/audio/whatsapp-notification-tone.mp3'); ?>" type="audio/mpeg">
    </audio>
 </template>
    <script>
        (function($) {
            'use strict';
            window.appConfig = {
                debug: "<?php echo e(config('app.debug')); ?>",
                csrf_token: "<?php echo e(csrf_token()); ?>",
                locale : '<?php echo e(app()->getLocale()); ?>',
                vendorUid : '<?php echo e(getVendorUid()); ?>',
                pusher : {
                    key : "<?php echo e(config('broadcasting.connections.pusher.key')); ?>",
                    cluster : "<?php echo e(config('broadcasting.connections.pusher.options.cluster')); ?>"
                },
            }
        })(jQuery);
    </script>
    <?= __yesset(
        [
            'dist/js/jsware.js',
            'dist/js/app.js',
            'dist/js/bootstrap.js',
            // keep it last
            'dist/js/alpinejs.min.js',
        ],
        true,
    ) ?>
    <?php echo $__env->yieldPushContent('vendorLibs'); ?>
    <script src="<?php echo e(route('vendor.load_server_compiled_js')); ?>"></script>
    <?php echo $__env->yieldPushContent('footer'); ?>
    <?php echo $__env->yieldPushContent('appScripts'); ?>
    <script>
    (function($) {
        'use strict';
        <?php if(session('alertMessage')): ?>
            showAlert("<?php echo e(session('alertMessage')); ?>", "<?php echo e(session('alertMessageType') ?? 'info'); ?>");
            <?php
                session('alertMessage', null);
                session('alertMessageType', null);
            ?>
        <?php endif; ?>
        <?php if(hasVendorAccess()): ?>
        var broadcastActionDebounce;
        window.Echo.private(`vendor-channel.${window, appConfig.vendorUid}`).listen('.VendorChannelBroadcast', function (data) {
            clearTimeout(broadcastActionDebounce);
            broadcastActionDebounce = setTimeout(function() {
                // generic model updates
                if(data.eventModelUpdate) {
                    __DataRequest.updateModels(data.eventModelUpdate);
                }
                // contact list update
                if($('.lw-whatsapp-chat-window').length) {
                    __DataRequest.get(__Utils.apiURL("<?php echo e(route('vendor.contacts.data.read', ['contactUid'])); ?>", {'contactUid': $('#lwWhatsAppChatWindow').data('contact-uid')}),{}, function() {});
                }
                // chat updates
                if(data.contactUid && $('.lw-contact-window-' + data.contactUid).length) {
                        __DataRequest.get(__Utils.apiURL("<?php echo e(route('vendor.chat_message.data.read', ['contactUid'])); ?>", {'contactUid': data.contactUid}),{}, function() {
                            window.lwScrollTo('#lwEndOfChats', true)
                        });
                } else {
                    // play the sound for incoming message notifications
                    if(data.isNewIncomingMessage &&  $('#lwMessageAlertTone').length) {
                        $('#lwMessageAlertTone')[0].play();
                    }
                }
                // campaign data update
                if(data.campaignUid && $('.lw-campaign-window-' + data.campaignUid).length) {
                    __DataRequest.get(__Utils.apiURL("<?php echo e(route('vendor.campaign.status.data', ['campaignUid'])); ?>", {'campaignUid': data.campaignUid}));
                };
            }, 300);
        });
        // initially get the unread count on page loads
        __DataRequest.get("<?php echo e(route('vendor.chat_message.read.unread_count')); ?>",{}, function() {});
    <?php endif; ?>
    })(jQuery);
    </script>
</body>
</html><?php /**PATH C:\xampp\htdocs\zap\resources\views/layouts/app.blade.php ENDPATH**/ ?>