<script lang="ts">
	import "./layout.css";
	import favicon from "$lib/assets/favicon.svg";
	import { themeStore } from "$lib/stores/theme.svelte";
	import { ErrorBoundary } from "$lib/components";
	import { onMount } from "svelte";

	let { children } = $props();

	// Apply saved theme colors on mount
	onMount(() => {
		themeStore.applyTheme();
	});
</script>

<svelte:head>
	<link rel="icon" href={favicon} />
</svelte:head>

<ErrorBoundary>
	{@render children()}
</ErrorBoundary>
