import { getManga } from '$lib/api/mangas';
import { listGenres, type Genre } from '$lib/api/genres';
import type { PageLoad } from './$types';

export const ssr = false;

export const load: PageLoad = async ({ params }) => {
    const [manga, genres] = await Promise.all([
        getManga(params.id),
        listGenres()
    ]);
    return { manga, genres: genres as Genre[] };
};
