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

require([
    'jquery',
    'mage/translate',
    'domReady!'
], function (
    $,
    $t
) {
    'use strict';
    
    window.wtaGeneralErrorMessage = $t("A system error has occurred. Please try again. If the issue persists, please contact our support team at support@writetext.ai.");

    $(document).ready(function () {
        $('#messages .messages .message').each(function () {
            var $this = $(this);
            var $span = $('<span class="action-close"></span>');

            $span.on('click', function () {
                $this.fadeOut();
            });
            
            $this.append($span);
        });
    });
});