"use client";

import Sidebar from "@/components/layout/Sidebar";
import TopBar from "@/components/layout/TopBar";
import TradePanel from "@/components/common/TradePanel";
import { useApp } from "@/contexts/AppContext";

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

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

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

        <div className="flex-1 p-4 md:p-8 bg-[#F3F4F6] dark:bg-gray-900">
          <div className="h-full flex items-start md:items-center justify-center">
            <div className="w-full md:w-auto bg-white dark:bg-gray-800 rounded-3xl border border-border-gray dark:border-gray-700 p-4 md:p-8">
              <TradePanel
                showHeader={true}
                title={t("swap.title")}
                subtitle={t("swap.subtitle")}
              />
            </div>
          </div>
        </div>
      </div>
    </div>
  );
}
