"use client";

import { useRouter } from "next/navigation";
import {
  NextUIProvider,
  Tabs,
  Tab,
  Card,
  CardBody,
  Link,
} from "@nextui-org/react";
import { usePathname } from "next/navigation";

export function Providers({ children }) {
  const router = useRouter();
  const pathname = usePathname();

  return (
    <NextUIProvider navigate={router.push}>
      {/* <div className="flex w-full flex-col">
        <Tabs aria-label="Options" selectedKey={pathname}>
          <Tab key="/" title={<Link href="/">首页</Link>}></Tab>
          <Tab key="/dashboard" title={<Link href="/dashboard">DOC</Link>}></Tab>
        </Tabs>
      </div> */}
      <Link href="/">首页</Link>
      <Link href="/addItem">DOC</Link>
      {children}
    </NextUIProvider>
  );
}