<?php
/**
 * @author 1902 Software
 * @copyright Copyright © 2023 1902 Software (https://1902software.com/magento/)
 * @package WriteTextAI_WriteTextAI
 */
?>
<button class="wtai-history-log action"
    type="button"
    data-role="action"
    title="<?= $escaper->escapeHtml(__('History log')) ?>"
    disabled
></button>
<script>
require([
    'jquery',
    'WriteTextAI_WriteTextAI/js/model/history-log',
    'domReady!',
    'Magento_Ui/js/modal/modal'
    ], function($, historyLog) {
        'use strict';
        $('.wtai-history-log.action').on('click', function() {
            historyLog.recordId('');
            $('.wtai-history-log-modal').modal('openModal');
        });
    }
);
</script>
