const navBar = document.querySelector("nav")
const uiButton = document.querySelector("footer>section.left")
const audio = new Audio()

function startAudio() {
    audio.src = "/app/assets/audio/Golden Hill (Radio Edit).mp3"
    audio.loop = true
    audio.onended = () => {
        if (!audio.paused) {
            audio.play()
        }
    }
}

function muteAudio() {
    audio.muted = true
}

function unmuteAudio() {
    audio.muted = false
}

function showNavBar() {
    navBar.removeAttribute("hidden")
    for (const button of uiButton.children) {
        button.setAttribute("hidden", "")
    }
}

function hideNavBar() {
    navBar.setAttribute("hidden", "")
    for (const button of uiButton.children) {
        button.removeAttribute("hidden")
    }
}