import { ModuleScaffold } from "@/components/admin/module-scaffold";
import { AdminPermissionGate } from "@/components/admin/admin-permission-gate";
import { SettlementCenterConsole } from "@/modules/settlement/settlement-center-console";
import { PRD_SETTLEMENT_AGENT_ACCESS_ANY } from "@/lib/admin-prd";
import { buildPageMetadata } from "@/lib/page-metadata";
import type { Metadata } from "next";

export const metadata: Metadata = buildPageMetadata("settlementCenter", "title");

export default function SettlementCenterPage(): React.ReactElement {
  return (
    <ModuleScaffold embedded>
      <AdminPermissionGate
        requiredAny={PRD_SETTLEMENT_AGENT_ACCESS_ANY}
        allowWhenBoundLineAgent
      >
        <SettlementCenterConsole />
      </AdminPermissionGate>
    </ModuleScaffold>
  );
}
