// Always close the code, cause you can make conflicts (same for css use prefixes)
(function ($) {

  let slug = $('#nri-slug-wrapper').data('slug');

  function banner_hide() {
    $('#nri-sub-wrapper').hide(450);
    $('#nri-slug-wrapper').hide(400);
  }

  $('.nri-dismiss').on('click', function () {

    $.post(ajaxurl, { action: 'inisev_review', nonce: inisev_review_dismiss.nonce, token: 'irbh', slug: slug, mode: 'dismiss' }).done(function (res) {

    }).fail(function (err) {
      console.error(err);
    });

    banner_hide();

  });

  $('.nri-remind').on('click', function () {

    $.post(ajaxurl, { action: 'inisev_review', nonce: inisev_review_dismiss.nonce, token: 'irbh', slug: slug, mode: 'remind' }).done(function (res) {

    }).fail(function (err) {
      console.error(err);
    });

    banner_hide();

  });

})(jQuery);
