"use client";

import { useSession } from "next-auth/react";
import { ExecutiveOverview } from "@/components/dashboard/executive-overview";
import { DashboardSkeleton } from "@/components/ui/loading-skeletons";

export default function ManagementDashboard() {
  const { data: session, status } = useSession();
  const firstName = session?.user?.name?.split(" ")[0] || "there";

  if (status === "loading") {
    return <DashboardSkeleton />;
  }

  return (
    <ExecutiveOverview
      title={`${firstName}'s executive view`}
      subtitle="Organisation-wide health across teams, performance, and people who need attention."
    />
  );
}
