import type { LayoutLoad } from './$types';
import { bootstrap, user } from '$lib/auth/store.svelte';
import { restoreQueue } from '$lib/player/store.svelte';

export const ssr = false; // adapter-static fallback; we're SPA-only
export const prerender = false;

export const load: LayoutLoad = async () => {
  await bootstrap();
  const userId = user.value?.id;
  if (userId) restoreQueue(userId);
  return {};
};
