import { CustomerPageShell } from "@/app/customer/_components/customer-page-shell";
import { TransactionPageGuard } from "@/app/customer/_components/transaction-page-guard";
import { CUSTOMER_ROUTE_KEYS } from "@/config/customer-route-keys";
import { ListFxAccumulatorsTable } from "./_components/list-fx-accumulator-table/table";

type PageProps = { params: Promise<{ tenant: string }> };

export default async function FxAccumulatorPage({ params }: PageProps) {
  const { tenant } = await params;
  return (
    <CustomerPageShell>
      <TransactionPageGuard
        tenant={tenant}
        routeKeys={CUSTOMER_ROUTE_KEYS.fxAccumulatorIndex}
        label="FX Accumulator"
      >
        <ListFxAccumulatorsTable />
      </TransactionPageGuard>
    </CustomerPageShell>
  );
}
