<?php
/**
 * Copyright © Landofcoder LLC. All rights reserved.
 * See COPYING.txt for license details.
 * https://landofcoder.com | info@landofcoder.com
 */
?>

<style>
    svg {
        width: 50px;
        display: block;
        margin: 20px auto 0;
    }
    .path {
        stroke-dasharray: 1000;
        stroke-dashoffset: 0;
    }
    .path.circle {
        -webkit-animation: dash 0.9s ease-in-out;
        animation: dash 0.9s ease-in-out;
    }
    .path.line {
        stroke-dashoffset: 1000;
        -webkit-animation: dash 0.9s 0.35s ease-in-out forwards;
        animation: dash 0.9s 0.35s ease-in-out forwards;
    }
    .path.check {
        stroke-dashoffset: -100;
        -webkit-animation: dash-check 0.9s 0.35s ease-in-out forwards;
        animation: dash-check 0.9s 0.35s ease-in-out forwards;
    }
    .modal-popup p {
        text-align: center;
        margin: 20px 0 60px;
        font-size: 1.25em;
    }
    .modal-popup p.success {
        color: #73AF55;
    }
    .modal-popup p.error {
        color: #D06079;
    }
    @-webkit-keyframes dash {
        0% {
            stroke-dashoffset: 1000;
        }
        100% {
            stroke-dashoffset: 0;
        }
    }
    @keyframes dash {
        0% {
            stroke-dashoffset: 1000;
        }
        100% {
            stroke-dashoffset: 0;
        }
    }
    @-webkit-keyframes dash-check {
        0% {
            stroke-dashoffset: -100;
        }
        100% {
            stroke-dashoffset: 900;
        }
    }
    @keyframes dash-check {
        0% {
            stroke-dashoffset: -100;
        }
        100% {
            stroke-dashoffset: 900;
        }
    }
    p.external-link{
        font-style: italic;
    }
    div.error-wrapper {
        max-height: 300px;
        overflow: scroll;
        margin-bottom: 40px;
    }
    div.error-wrapper p{
        text-align: left;
    }
    .modal-popup.confirm .modal-inner-wrap {
        width: 85rem;
        padding-right: 25px;
    }
    .modal-popup.confirm .modal-inner-wrap .modal-content{
        padding-right: 0;
    }
</style>

<!--[if lte IE 9]>
<style>
    .path {stroke-dasharray: 0 !important;}
</style>
<![endif]-->

<?php /** @var $block Ves\All\Block\Adminhtml\Verify  */ ?>

<?php foreach ($block->verify() as $result) : ?>
    <?php if ($result['has_error'] === false) : ?>
        <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2">
            <circle class="path circle" fill="none" stroke="#73AF55" stroke-width="6" stroke-miterlimit="10" cx="65.1" cy="65.1" r="62.1"/>
            <polyline class="path check" fill="none" stroke="#73AF55" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" points="100.2,40.2 51.5,88.8 29.8,67.5 "/>
        </svg>
        <p class="success">Oh Yeah!</p>
        <p><?php echo $result['msg'] ?></p>
        <p class="external-link">
            Get more from your order Confirmation emails by promoting other complementary products!
            Learn more about our new <a href="https://landofcoder.com/" target="_blank">Magento 2 Extensions</a>.
        </p>
    <?php else : ?>
        <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2">
            <circle class="path circle" fill="none" stroke="#D06079" stroke-width="6" stroke-miterlimit="10" cx="65.1" cy="65.1" r="62.1"/>
            <line class="path line" fill="none" stroke="#D06079" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="34.4" y1="37.9" x2="95.8" y2="92.3"/>
            <line class="path line" fill="none" stroke="#D06079" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="95.8" y1="38" x2="34.4" y2="92.2"/>
        </svg>
        <p class="error">Bummer!</p>
        <div class="error-wrapper">
            <p><?php echo $block->formatErrorMsg($result['msg']) ?> </p>
        </div>
        <p>
            Visit <a href="https://landofcoder.com" target="_blank">landofcoder.com</a> to learn more about our
            <a href="https://landofcoder.com/contacts/?utm_source=Custom%20Extensions&utm_medium=Premium%20Support%20Admin%20Error" target="_blank">Premium Support</a>.
        </p>
    <?php endif; ?>
<?php endforeach; ?>