import Pager from "@/components/pager";
import StreamsList from "@/components/streams-list";
import StreamsTable from '@/components/streams-table';
import { getAllStreams, getStreamsForVtuber } from "@/lib/streams";
// import { getAllVtubers } from "@/lib/vtubers";
import { notFound } from "next/navigation";



export default async function Page() {
    // const vtubers = await getAllVtubers();
    // const streams = await getAllStreams();
    // const streams = await getStreamsForVtuber(1)
    // const pageSize = 100;
    // const page = 1;


    // export interface IStream {
    //     id: number;
    //     attributes: {
    //         date: string;
    //         archiveStatus: 'good' | 'issue' | 'missing';
    //         vods: IVodsResponse;
    //         cuid: string;
    //         vtuber: IVtuberResponse;
    //         tweet: ITweetResponse;
    //         isChaturbateStream: boolean;
    //         isFanslyStream: boolean;
    //     }
    // }

    // if (!vtubers) notFound();
    // const streams = [
    //     {
    //         "firstName": "Tanner",
    //         "lastName": "Linsley",
    //         "age": 33,
    //         "visits": 100,
    //         "progress": 50,
    //         "status": "Married",
    //         "id": 5,
    //         "attributes": {
    //             date: '2023-10-10T15:18:20.003Z',
    //             archiveStatus: 'missing',
    //             isChaturbateStream: false,
    //             isFanslyStream: true,
    //             vods: {},
    //             cuid: '2983482932384',
    //             vtuber: {},
    //             tweet: '',
    //         }
    //     },
    //     {
    //         "firstName": "Kevin",
    //         "lastName": "Vandy",
    //         "age": 27,
    //         "visits": 200,
    //         "progress": 100,
    //         "status": "Single",
    //         "id": 3,
    //         "attributes": {
    //             date: '2023-10-10T15:18:20.003Z',
    //             archiveStatus: 'missing',
    //             isChaturbateStream: true,
    //             isFanslyStream: true,
    //             vods: {},
    //             cuid: '29823432384',
    //             vtuber: {},
    //             tweet: '',
    //         }
    //     }
    // ]

    return (
        <div className="section">
            {/* <pre>
                <p>here are the streams object</p>
                <code>
                    {JSON.stringify(streams, null, 2)}
                </code>
            </pre> */}



            <h1 className="title">Stream Archive</h1>
            <StreamsTable />
            {/* <StreamsList vtubers={vtubers} page={page} pageSize={pageSize} />
            <Pager baseUrl="/streams" page={page} pageCount={vtubers.length/pageSize}/> */}
        </div>
    )
}