import { Button } from '@/components/ui/button'; import { useLocale } from '@/hooks/use-locale'; import { formatMonthYear } from '@/utils/date'; import { __ } from '@/utils/i18n'; import { addMonths, isSameMonth, subMonths } from 'date-fns'; import { ChevronLeft, ChevronRight } from 'lucide-react'; interface PeriodNavigationProps { currentDate: Date; onDateChange: (date: Date) => void; } export function PeriodNavigation({ currentDate, onDateChange, }: PeriodNavigationProps) { const locale = useLocale(); const now = new Date(); const isCurrentMonth = isSameMonth(currentDate, now); const handlePrevMonth = () => { onDateChange(subMonths(currentDate, 1)); }; const handleNextMonth = () => { onDateChange(addMonths(currentDate, 1)); }; const handleCurrentMonth = () => { onDateChange(now); }; return (