<svelte:options runes={true} />

<script lang="ts">
    import {onMount} from "svelte";
    import AlbumsView from "$lib/components/custom/Views/AlbumsView.svelte";
    import {View} from "$lib/components/custom/Views/views.svelte";
    import {queueState} from "$lib/states/play-queue.svelte";
    import {playbackState} from "$lib/states/playback-state.svelte";
    import {viewState} from "$lib/states/view-state.svelte";

    onMount(() => {
        queueState.getPlayQueue(true);
        playbackState.song = new Audio(); // needed so source is not undefined
    })
</script>

<svelte:head>
    <title>Lydstyrke - {playbackState.metaData.title}({playbackState.metaData.artist})</title>
    <meta name="robots" content="noindex nofollow" />
</svelte:head>

<div class="border border-2 col-span-3 overflow-hidden">
    {#if viewState.current.mode === View.Albums}es
        <AlbumsView />
    {:else if viewState.current.mode === View.Artists}
        <p>Get Fucked</p>
    {/if}
</div>


