import { requireAdminAuth } from "@/lib/staff-auth";
import IntegrationsHealthDashboard from "@/components/staff/integrations/IntegrationsHealthDashboard";

export const metadata = {
  title: "Integrations - Staff Dashboard",
  description: "Monitor integration health and troubleshoot connection issues",
};

export default async function IntegrationsPage() {
  // Only ADMIN and SUPER_ADMIN can access integrations dashboard
  await requireAdminAuth();

  return (
    <div className="space-y-6">
      <div>
        <h1 className="text-3xl font-bold text-brand-ink">
          Integrations Health Monitor
        </h1>
        <p className="text-gray-600 mt-1">
          Monitor integration status, view errors, and troubleshoot connection
          issues
        </p>
      </div>

      <IntegrationsHealthDashboard />
    </div>
  );
}
