import type { ReactNode } from "react" import { Card } from "../Card/Card.tsx" import type { ScheduleDay } from "./ScheduleBoard.tsx" import { type ScheduleEntry, ScheduleItem, } from "./ScheduleItem.tsx" export const ScheduleDayCards = ({ day, items, onSelect, }: { day: ScheduleDay items: readonly ScheduleEntry[] onSelect?: (key: string) => void }): ReactNode => (

{day.label}, {day.dateLabel} {day.isCurrent ? " ยท Today" : ""}

{items.length === 0 ? (

{day.emptyLabel ?? "Nothing scheduled"}

) : ( [...items] .sort( (first, second) => (first.startMinute ?? -1) - (second.startMinute ?? -1), ) .map((item) => ( )) )}
)