
( function ( wp, $ ) {
	'use strict';

	if ( ! wp ) {
		return;
	}

	function dismissNotice() {
		$.ajax( {
			type: 'POST',
			url: ajaxurl,
			data: {
				nonce: iconvertShoply.nonce,
				action: 'iconvert_shoply_dismiss_notice',
			},
			dataType: 'json',
		} );
	}

	$( function () {
		// Dismiss notice
		$( document ).on(
			'click',
			'.iconvert-shoply-notice .notice-dismiss',
			function () {
				dismissNotice();
			}
		);

	} );
} )( window.wp, jQuery );
