<?php
/**
 * @author 1902 Software
 * @copyright Copyright © 2023 1902 Software (https://1902software.com/magento/)
 * @package WriteTextAI_WriteTextAI
 */
?>
<div class="wtai-grid-keyword-invalid-image-popup wtai-no-display" data-bind="
    scope: 'wtaiGridKeywordInvalidImagePopup'
">
    <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>
        <!-- ko if: invalid ||
                    invalid().length
        -->
        <div data-bind="visible: invalid().length">
            <p class="wtai-upload-error-message" data-bind="text: errorMessages().invalid">Invalid images:</p>
        </div>
        <div class="wtai-images" data-bind="foreach: invalid()">
            <img data-bind="attr: { src: $data.url }" />
        </div>
        <!-- /ko -->
        <!-- ko if: notSupported ||
                    notSupported().length
        -->
        <div data-bind="visible: notSupported().length">
            <p class="wtai-upload-error-message" data-bind="
                text: errorMessages().not_supported
            ">Not supported images:</p>
        </div>
        <div class="wtai-images" data-bind="foreach: notSupported()">
            <img data-bind="attr: { src: $data.url }" />
        </div>
        <!-- /ko -->
        <!-- ko if: downloadFailed ||
                    downloadFailed().length
        -->
        <div data-bind="visible: downloadFailed().length">
            <p class="wtai-upload-error-message" data-bind="
                text: errorMessages().download_failed
            ">Download failed images:</p>
        </div>
        <div class="wtai-images" data-bind="foreach: downloadFailed()">
            <img data-bind="attr: { src: $data.url }" />
        </div>
        <!-- /ko -->
        <!-- ko if: general ||
                    general().length
        -->
        <div data-bind="visible: general().length">
            <p class="wtai-upload-error-message" data-bind="text: errorMessages().general">General images:</p>
        </div>
        <div class="wtai-images" data-bind="foreach: general()">
            <img data-bind="attr: { src: $data.url }" />
        </div>
        <!-- /ko -->
    </div>
</div>

<script type="text/x-magento-init">
    {
        "*": {
            "Magento_Ui/js/core/app": {
                "components": {
                    "wtaiGridKeywordInvalidImagePopup": {
                        "component": "WriteTextAI_WriteTextAI/js/grid/popups/keyword-invalid-image-popup"
                    }
                }
            }
        }
    }
</script>
