"use client" import { useState } from "react"; import { CalendarMonthModel } from "./calendarMonthUtils"; import { DayOfWeek, LocalCourse } from "@/models/local/localCourse"; import Day from "./Day"; export default function CalendarMonth({ month, localCourse, }: { month: CalendarMonthModel; localCourse: LocalCourse; }) { const [isCollapsed, setIsCollapsed] = useState(false); const isInPast = new Date(month.year, month.month - 1, 1) < new Date(Date.now()); const monthName = new Date(month.year, month.month - 1, 1).toLocaleString( "default", { month: "long" } ); const toggleCollapse = () => setIsCollapsed(!isCollapsed); // const collapseClass = isInPast ? "collapse _hide" : "collapse _show"; const weekDaysList: DayOfWeek[] = Object.values(DayOfWeek); return ( <>