import type { LucideIcon } from "lucide-react" import { EmptyState } from "@/shared/components/ui/empty-state" /** * 家长视角下"多子女数据聚合页"的共享布局。 * 用于 attendance / grades 等需要遍历所有子女展示同类数据的页面, * 消除重复的 dataScope 空状态处理与页面骨架代码。 */ export function ParentChildrenDataPage({ title, description, icon, noRecordsTitle, noRecordsDescription, items, renderItem, }: { title: string description: string icon: LucideIcon noRecordsTitle: string noRecordsDescription: string items: T[] renderItem: (item: T) => React.ReactNode }) { const hasItems = items.length > 0 return (

{title}

{description}

{!hasItems ? ( ) : (
{items.map((item, idx) => (
{renderItem(item)}
))}
)}
) } /** * dataScope 为空(家长未关联子女)时的统一空状态页面。 */ export function ParentNoChildrenPage({ title, description, icon, emptyTitle, emptyDescription, }: { title: string description: string icon: LucideIcon emptyTitle: string emptyDescription: string }) { return (

{title}

{description}

) }