document.addEventListener('DOMContentLoaded', hideBanner);

// Hide banner and add cookie
function hideBanner() {
	const banner = document.querySelector('.fsd-sb-info-banner'); // Assuming banner is the ID of your banner element
	const closeBtn = document.querySelector('.fsd-sb-info-banner__close');

	if(closeBtn) {
		closeBtn.addEventListener('click', function() {
			// banner.style.display = 'none';
			banner.classList.add('fsd-sb-info-banner--hidden');
			setCookie('fsd-simple-banner', 'hidden', 7)
		})
	}
}

// Set cookie to hide banner
function setCookie(name,value,days) {
	var expires = "";
	if (days) {
		var date = new Date();
		date.setTime(date.getTime() + (days*24*60*60*1000));
		expires = "; expires=" + date.toUTCString();
	}
	document.cookie = name + "=" + (value || "")  + expires + "; path=/";
}
