"use client"
import { Card, CardBody, CardHeader, CardIcon } from "@/components/window/Card"
import { cn } from "@heroui/react"
import { SettingConfig } from "@icon-park/react"
import { usePathname, useRouter } from "next/navigation"

export default function PreferenceLayout({
  children,
}: { children: React.ReactNode }) {
  const router = useRouter()
  const pathname = usePathname()

  return (
    <Card className="h-full max-w-full overflow-y-scroll">
      <CardHeader>
        <CardIcon
          type="menu"
          onClick={() => router.push("/console/cfgx")}
          className={cn(pathname === "/console/cfgx" && "bg-black/5")}
        >
          <SettingConfig /> CFGX
        </CardIcon>
        {/* <CardIcon
          type="menu"
          onClick={() => router.push("/console/path")}
          className={cn(pathname === "/console/path" && "bg-black/5")}
        >
          <AssemblyLine /> 路径
        </CardIcon>
        <CardIcon
          type="menu"
          onClick={() => router.push("/console/replay")}
          className={cn(pathname === "/console/replay" && "bg-black/5")}
        >
          <Videocamera /> 录像
        </CardIcon> */}

        {/* <CardTool>
          <ToolButton>
            <UploadOne />
            云同步
          </ToolButton>
          <ToolButton>
            <HardDisk />
            保存
          </ToolButton>
        </CardTool> */}
      </CardHeader>
      <CardBody>{children}</CardBody>
    </Card>
  )
}
