"use client"; import { motion } from "framer-motion"; import { Droplets, Gauge, MapPin, Navigation, Umbrella, Wind } from "lucide-react"; import { calculateFeelsLike, formatDateTime, formatHumidity, formatPressure, formatRainfall, formatTemperature, formatWind, getWeatherDescription, getWeatherMoodFromData, moodGradient, } from "@/lib/weather-utils"; import type { SynopStation } from "@/types/imgw"; import { WeatherIcon } from "@/components/weather/weather-icon"; export function WeatherHero({ station }: { station: SynopStation }) { const mood = getWeatherMoodFromData(station); const feelsLike = calculateFeelsLike(station.temperature, station.humidity, station.windSpeed); const metrics = [ { icon: Droplets, label: "Wilgotność", value: formatHumidity(station.humidity) }, { icon: Wind, label: "Wiatr", value: formatWind(station.windSpeed) }, { icon: Umbrella, label: "Opad", value: formatRainfall(station.rainfall) }, { icon: Gauge, label: "Ciśnienie", value: formatPressure(station.pressure) }, ]; return (
{station.name}
{formatTemperature(station.temperature)}

{getWeatherDescription(station)}

Odczuwalna {formatTemperature(feelsLike)} · pomiar {formatDateTime(station.measuredAt)}

{metrics.map(({ icon: Icon, label, value }) => (
{label}

{value}

))}
{station.windDirection !== null && (

Kierunek wiatru: {station.windDirection}°

)}
); }