<svelte:head>
    <script>
        if (document) {
            const defaultTheme = 'dark';
            const itemTheme = localStorage.getItem("theme") ?? defaultTheme;

            localStorage.setItem("theme", itemTheme);
            document.documentElement.setAttribute("data-theme", itemTheme);
        }
    </script>
</svelte:head>

<slot></slot>
