<script lang="ts">
	import "../app.css";
	import { Toaster } from "$lib/components/ui/sonner";
	import { browser } from "$app/environment";
	import { QueryClient, QueryClientProvider } from "@tanstack/svelte-query";

	let { children } = $props();

	const queryClient = new QueryClient({
		defaultOptions: { queries: { enabled: browser } },
	});
</script>

<svelte:head>
	<title>Admin</title>
	<meta name="description" content="Backend management panel" />
</svelte:head>

<Toaster />

<QueryClientProvider client={queryClient}>
	{@render children?.()}
</QueryClientProvider>
