import type { PageServerLoad } from './$types';
import { GetNotificationStore } from '$houdini';

export const load: PageServerLoad = async (event) => {
	const { params, locals } = event;

	const fetchParams = { event, metadata: { cookie: locals.cookie } };

	const result = await new GetNotificationStore().fetch({
		...fetchParams,
		variables: {
			id: params.notification
		}
	});

	return {
		notification: result
	};
};
