
import VodsList, { VodsListHeading } from '@/app/components/vods-list'
import { getVtuberBySlug, getUrl } from '@/app/lib/vtubers'
import { IVodsResponse, getVodsForVtuber, getPaginatedUrl } from '@/app/lib/vods'
import Pager from '@/app/components/pager'
import { notFound } from 'next/navigation'

interface IPageParams {
    params: {
        slug: string;
    }
}

export default async function Page({ params }: IPageParams) {
    const vtuber = await getVtuberBySlug(params.slug)
    const pageCount = 24
    if (!vtuber) notFound();
    const vods = await getVodsForVtuber(vtuber.id, 1, pageCount)
    if (!vods) notFound();
    return (
        <>
            <pre>
                <code>
                    {JSON.stringify(vods, null, 2)}
                </code>
            </pre>
            {/* <VodsListHeading slug={vtuber.slug} displayName={vtuber.display_name}></VodsListHeading>
            <VodsList vtuber={vtuber} vods={vods} page={1} pageSize={24} />
            <Pager baseUrl={`/vt/${params.slug}/vods`} page={1} pageCount={vods.length/pageCount} /> */}
        </>
    )
}