import $ from "jquery";

$(document).ready(function() {
    $(document).on('click', '.develuxsct-notice-help-info .notice-dismiss', function() {

        const nonce = $('.develuxsct-notice-help-info').data('nonce');
        if (!nonce) {
            console.error('Nonce not found!');
            return;
        }

        $.post(develuxsct_HelpNoticeScript.ajax_url, {
            action: 'develuxsct_dismiss_help_info_notice',
            security: nonce
        }, function(response) {
            console.log('AJAX Response:', response);
        }).fail(function(xhr, status, error) {
            console.error('AJAX Error:', error);
        });
    });
});