import HeaderNav from "./_ui/HeaderNav";
import SiderNav from "./_ui/SiderNav";
import Search from "./_ui/Search";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faArrowRotateBack, faDeafness, faImage, faMagnet, faMessage, faPenClip, faSearch, faThumbsUp, faVideo } from '@fortawesome/free-solid-svg-icons'
import { LinkTypeItem } from "./_lib/types";
import PosterBox from "./_ui/PosterBox";
import { mRequest } from "./_lib/request";
import { LinkType } from "./api/linkType/route";
import { getCollection } from "./_lib/mongodb";
import { Link as _Link } from "./api/link/route";
import Link from "next/link";
import LinkListBox from "./_ui/LinkListBox";
import { getLinkTypeList } from "./_lib/data/linkType";
import { getLinkList } from "./_lib/data/link";

export default async function Home() {

  const { list: linkTypeList } = await getLinkTypeList({})

  const { list: linkList } = await getLinkList({})

  return (
    <div className="flex min-h-full w-full font-[family-name:var(--font-geist-sans)] relative">
      <SiderNav linkList={linkTypeList} />
      <div className="absolute -z-10 from-[#E6EEF4] h-[50vh] w-full  bg-gradient-to-br   via-[#F1ECF4] to-[#F5ECEA]">

        <div className="absolute z-10 from-[#F9F9F9] left-0 to-transparent bg-gradient-to-t w-full h-[100px] bottom-[0px]">
        </div>

      </div>
      <main className="flex-1 relative  flex  flex-col p-5  gap-y-4">

        {/* <HeaderNav></HeaderNav> */}
        <Search></Search>
        {/* <PosterBox posterList={[]} /> */}
        <LinkListBox linkList={linkList} linkTypeList={linkTypeList} showHot showRecent></LinkListBox>
      </main>
    </div>
  );
}
