import type { RequestEvent, RequestHandler } from './$types'
import {json} from '@sveltejs/kit'
export const GET: RequestHandler = async ({params}: RequestEvent) => {
    let content = ""
    let image
    const page:string =  params.page
    switch (page) {
        case "home":
            content = (await import('$lib/data/content/home.html?raw')).default
            image = "/images/pattern.png"
            break;
        case "qualifying":
            content = (await import('$lib/data/content/qualifying.html?raw')).default
            break;
        case "competitive":
            content = (await import('$lib/data/content/competitive.html?raw')).default
            break;
        case "about":
            content = (await import('$lib/data/content/about.html?raw')).default
            break;
    }
    return json({content,image})
}
