import type { LayoutLoad } from './$types';

export const load = (({ url }) => {
	return {
		// TODO: refactor to one source of truth for all query param values
		query: url.searchParams.get('query')  || '',
		page: parseInt(url.searchParams.get('page')  || '0'),
		limit: parseInt(url.searchParams.get('pageSize') || '64'),
	};

}) satisfies LayoutLoad;
