<?php
/**
 * @author 1902 Software
 * @copyright Copyright © 2023 1902 Software (https://1902software.com/magento/)
 * @package WriteTextAI_WriteTextAI
 */
?>
<div class="wtai-keywords-invalid-image-popup" data-bind="scope: 'wtaiKeywordsInvalidImagePopup'">
    <div class="wtai-content">
        <p class="wtai-proceedable-paragraph" > 
            <?= $block->escapeHtml(__("You can proceed with Keyword analysis"
                . " without the invalid featured image being taken into consideration,"
                . " or cancel and upload a different image to try again.")) ?>
        </p>
        <p class="wtai-upload-error-message" data-bind="text: uploadErrorMessage"></p>
        <div class="wtai-images">
            <img data-bind="attr: { src: getThumbnail() }">
        </div>
        <div class="wtai-do-not-show-again">
            <label data-bind="visible: (typeof showProceed === 'function') ? showProceed() : true">
                <input type="checkbox" data-bind="checked: doNotShowAgain">
                <?= $block->escapeHtml(__("Do not show this message again.")) ?>
            </label>
        </div>
    </div>
</div>

<script>
    window.wtaiInvalidImagePopupDoNotShowAgain = <?= /* @noEscape */ $block->isDoNotShowAgain() ? 'true' : 'false' ?>;
</script>

<script type="text/x-magento-init">
    {
        "*": {
            "Magento_Ui/js/core/app": {
                "components": {
                    "wtaiKeywordsInvalidImagePopup": {
                        "component": "WriteTextAI_WriteTextAI/js/edit/keywords/invalid-image-popup",
                        "saveUrl": "<?= $block->escapeJs($block->getSaveUrl()) ?>",
                        "doNotShowAgainValue": <?= /* @noEscape */ $block->isDoNotShowAgain() ? 'true' : 'false' ?>
                    }
                }
            }
        }
    }
</script>
