import Link from "next/link" import { CalendarCheck, CalendarDays, GraduationCap, Users } from "lucide-react" import { Button } from "@/shared/components/ui/button" import { EmptyState } from "@/shared/components/ui/empty-state" import { ChildCard } from "./child-card" import type { ParentDashboardData } from "@/modules/parent/types" export function ParentDashboard({ data }: { data: ParentDashboardData }) { const { parentName, children } = data const hasChildren = children.length > 0 const hour = new Date().getHours() let greeting = "Welcome" if (hour < 12) greeting = "Good morning" else if (hour < 18) greeting = "Good afternoon" else greeting = "Good evening" return (

Parent Dashboard

{greeting} {parentName ? `, ${parentName}` : ""}. Here's an overview of your children.
{!hasChildren ? ( ) : ( <>
{children.length} {children.length === 1 ? "child" : "children"} linked
{children.map((child) => ( ))}
)}
) }