"use strict";

// ENEBLED JS AND CSS CHECK
let cssEnabled = false;
if (document.querySelector('[data-css-enabled-check]').clientWidth === 0) {
	cssEnabled = true;
	document.querySelector('[data-css-js-check-container]').style.display = 'none';
}

// SLEEP FUNC
const sleep = (ms) => new Promise(res => setTimeout(res, ms));

// AUDIO FADE OUT FUNC
// const fadeOut = (audioElement) => {
// 	const newVol = audioElement.volume - 0.1;
// 	if (newVol <= 0) {
// 		audioElement.volume = 0;
// 	} else {
// 		audioElement.volume = newVol;
// 		setTimeout(() => fadeOut(audioElement), 100);
// 	}
// };

// GAME
let lesofon;
if (cssEnabled) {
	window.addEventListener('DOMContentLoaded', () => {
		lesofon = new Lesofon();
	});
}
