import { ModuleScaffold } from "@/components/admin/module-scaffold";
import { AdminPermissionGate } from "@/components/admin/admin-permission-gate";
import { AgentsManagementScreen } from "@/modules/agents/agents-management-screen";
import {
  PRD_AGENT_LINE_PROVISION_ACCESS_ANY,
  PRD_AGENTS_ACCESS_ANY,
} from "@/lib/admin-prd";
import { buildPageMetadata } from "@/lib/page-metadata";
import type { Metadata } from "next";

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

export default function AgentsPage() {
  return (
    <ModuleScaffold embedded>
      <AdminPermissionGate
        requiredAny={[...PRD_AGENTS_ACCESS_ANY, ...PRD_AGENT_LINE_PROVISION_ACCESS_ANY]}
      >
        <AgentsManagementScreen />
      </AdminPermissionGate>
    </ModuleScaffold>
  );
}