/** * Calendar header: month title, prev/next navigation, weekday labels. * Replaces the header from webapp index.html and calendar.js month title. */ "use client"; import { useTranslation } from "@/i18n/use-translation"; import { cn } from "@/lib/utils"; import { MonthNavHeader } from "@/components/calendar/MonthNavHeader"; export interface CalendarHeaderProps { /** Currently displayed month (used for title). */ month: Date; /** Whether month navigation is disabled (e.g. during loading). */ disabled?: boolean; onPrevMonth: () => void; onNextMonth: () => void; className?: string; } export function CalendarHeader({ month, disabled = false, onPrevMonth, onNextMonth, className, }: CalendarHeaderProps) { const { weekdayLabels } = useTranslation(); const labels = weekdayLabels(); return (
{labels.map((label, i) => ( {label} ))}
); }