"use client"; import { useState } from "react"; import Image from "next/image"; import { useApp } from "@/contexts/AppContext"; interface CalendarDayProps { day: number | null; value: string; type: "positive" | "negative" | "neutral" | "current"; } function CalendarDay({ day, value, type }: CalendarDayProps) { // Empty cell if (day === null) { return
; } const typeStyles = { positive: "bg-[#f2fcf7] dark:bg-green-900/20 border-[#cef3e0] dark:border-green-700/30", negative: "bg-[#fff8f7] dark:bg-red-900/20 border-[#ffdbd5] dark:border-red-700/30", neutral: "bg-[#f9fafb] dark:bg-gray-700 border-[#f3f4f6] dark:border-gray-600", current: "bg-[#111827] dark:bg-blue-600 border-[#111827] dark:border-blue-600", }; const isCurrent = type === "current"; const dayTextStyle = isCurrent ? "text-[#fcfcfd]" : "text-[#9ca1af] dark:text-gray-400"; // Value text color should match the type let valueTextStyle = ""; if (isCurrent) { valueTextStyle = "text-[#fcfcfd]"; } else if (type === "positive") { valueTextStyle = "text-[#10b981] dark:text-green-400"; } else if (type === "negative") { valueTextStyle = "text-[#dc2626] dark:text-red-400"; } else { valueTextStyle = "text-[#9ca1af] dark:text-gray-400"; } return ({t("performance.description")}