"use client"; import React, { useState, useEffect } from "react"; import { Moon, Sun } from "lucide-react"; import { Equipment, Process, ProductionType } from "./types"; interface PopHeaderProps { currentDateTime: Date; productionType: ProductionType; selectedEquipment: Equipment | null; selectedProcess: Process | null; showMyWorkOnly: boolean; theme: "dark" | "light"; onProductionTypeChange: (type: ProductionType) => void; onEquipmentClick: () => void; onProcessClick: () => void; onMyWorkToggle: () => void; onSearchClick: () => void; onSettingsClick: () => void; onThemeToggle: () => void; } export function PopHeader({ currentDateTime, productionType, selectedEquipment, selectedProcess, showMyWorkOnly, theme, onProductionTypeChange, onEquipmentClick, onProcessClick, onMyWorkToggle, onSearchClick, onSettingsClick, onThemeToggle, }: PopHeaderProps) { const [mounted, setMounted] = useState(false); useEffect(() => { setMounted(true); }, []); const formatDate = (date: Date) => { const year = date.getFullYear(); const month = String(date.getMonth() + 1).padStart(2, "0"); const day = String(date.getDate()).padStart(2, "0"); return `${year}-${month}-${day}`; }; const formatTime = (date: Date) => { const hours = String(date.getHours()).padStart(2, "0"); const minutes = String(date.getMinutes()).padStart(2, "0"); return `${hours}:${minutes}`; }; return (