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

export const load: LayoutServerLoad = async (event) => {
	const host = event.url.hostname;
	const isAdmin = host === 'adm.synops.no';
	if (isAdmin) {
		console.log('[layout] adm.synops.no detected, host=' + host);
	}
	return {
		session: await event.locals.auth(),
		isAdminHost: isAdmin,
	};
};
