<?php
/**
 * @author 1902 Software
 * @copyright Copyright © 2023 1902 Software (https://1902software.com/magento/)
 * @package WriteTextAI_WriteTextAI
 */
?>

<div class="wtai-text-feedback wtai-feedback-gallery">
    <div data-bind="
        afterRender: $parent.initPopup($data.id),
        click: function() { },
        clickBubble: false,
        attr: { class: 'wtai-text-feedback-content wtai-content-' + $data.id }
    ">
        <button class="wtai-like wtai-active"
            data-bind="
                click: function () { $parent.like($data) },
                visible: $parent.isLiked($data),
                css : { 'wtai-liked': $parent.isLiked($data) }
            "
        ></button>
        <button
            data-bind="
                click: function () { $parent.like($data) },
                hidden: $parent.isLiked($data),
                attr: { class: 'wtai-like wtai-dropdown-button-' + $data.id },
                css : {
                    'wtai-liked': $parent.isLiked($data)
                }
            "
        ></button>
        <button class="wtai-dislike wtai-active"
            data-bind="
                click: function () { $parent.dislike($data) },
                visible: $parent.isDisliked($data),
                css : { 'wtai-disliked': $parent.isDisliked($data) }
            "
        ></button>
        <button
            data-bind="
                click: function () { $parent.dislike($data) },
                hidden: $parent.isDisliked($data),
                attr: { class: 'wtai-dislike wtai-dropdown-button-' + $data.id },
                css : {
                    'wtai-disliked': $parent.isDisliked($data)
                }
            "
        ></button>
    </div>
</div>
