<?php
/**
 * Webkul Software.
 *
 *
 *
 * @category  Webkul
 * @package   Webkul_MobikulApi
 * @author    Webkul <support@webkul.com>
 * @copyright Webkul Software Private Limited (https://webkul.com)
 * @license   https://store.webkul.com/license.html ASL Licence
 * @link      https://store.webkul.com/license.html
 */
if (!$block->toShow()) {    ?>
    <div class="mk-downloadlink-container <?= $block->escapeHtml($block->getThemeName()); ?>">
        <div class="mk-downloadlink-label-container">
            <label class="mk-downloadlink-label"><?= $block->escapeHtml(__("Our apps also available at")); ?></label>
        </div>
        <div class="mk-downloadlink-button-container">
            <a class="mk-downloadlink-playstore-button" 
                href="<?= $block->escapeUrl($block->getUrl(
                    "mobikulhttp/downloadlink/openapp",
                    ["_secure"=>$block->getRequest()->isSecure()]
                )); ?>">
                <img class="mk-downloadlink-image-button" 
                    src="<?= $block->escapeUrl($block->getPlaystoreImageUrl()); ?>" 
                    alt="<?= $block->escapeHtml(__("Play store link")); ?>"/>
            </a>
            <a class="mk-downloadlink-appstore-button" href="<?= $block->escapeUrl($block->getAppstoreUrl()); ?>" 
                target="_blank">
                <img class="mk-downloadlink-image-button" 
                    src="<?= $block->escapeUrl($block->getAppstoreImageUrl()); ?>" 
                    alt="<?= $block->escapeHtml(__("App tore link")); ?>"/>
            </a>
        </div>
        <img class="mk-downloadlink-close-button" src="<?= $block->escapeUrl($block->getCloseButtonImageUrl()); ?>" 
            alt="<?= $block->escapeHtml(__("Close button")); ?>" onclick="rememberClicked();"/>
    </div>
    <?php   $params = [
            "rememberUrl" => $block->urlHelper->getUrl("mobikulhttp/downloadlink/remember")
        ];
        $params = $block->jsonHelper->jsonEncode($params);     ?>
    <script type="text/x-magento-init">
        {
            "*": {
                "downloadlinkQuery": <?= /* @noEscape */ $params; ?>
            }
        }
    </script>
<?php } ?>