<script lang="ts">
    import "../../app.pcss";
    import { setLocale } from "$lib/i18n/i18n-svelte";
    import { onMount } from "svelte";
    import type { LayoutData } from "./$types";
    import LocaleSwitcher from "$lib/components/locale-switcher.svelte";

    export let data: LayoutData;

    onMount(async () => {
        setLocale(data.locale);
    });
</script>

<LocaleSwitcher />
<slot />
