"use client";

import Sidebar from "@/components/layout/Sidebar";
import TopBar from "@/components/layout/TopBar";
import LendingHeader from "@/components/lending/LendingHeader";
import LendingStats from "@/components/lending/LendingStats";
import LendingPlaceholder from "@/components/lending/LendingPlaceholder";
import BorrowMarket from "@/components/lending/BorrowMarket";
import { useApp } from "@/contexts/AppContext";

export default function LendingPage() {
  const { t } = useApp();

  const breadcrumbItems = [
    { label: "ASSETX", href: "/" },
    { label: t("nav.lending") },
  ];

  return (
    <div className="min-h-screen bg-white dark:bg-gray-900 flex">
      <Sidebar />
      <div className="flex-1 flex flex-col ml-[222px]">
        <div className="bg-[#F3F4F6] dark:bg-gray-800 border-b border-border-normal dark:border-gray-700 px-8 py-3">
          <TopBar breadcrumbItems={breadcrumbItems} />
        </div>

        <div className="flex-1 px-8 py-8 bg-[#F3F4F6] dark:bg-gray-900 flex flex-col gap-8">
          <LendingHeader />
          <div className="grid gap-8 grid-cols-[760fr_362fr]">
            <LendingStats />
            <LendingPlaceholder />
          </div>
          <BorrowMarket />
        </div>
      </div>
    </div>
  );
}
