"use client"; import { CloudSun, Gauge, Loader2, RefreshCw, Thermometer } from "lucide-react"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import type { CityDetail } from "@/lib/types"; type CityDetailPanelProps = { detail: CityDetail | null; loading: boolean; onRefresh: () => void; }; export function CityDetailPanel({ detail, loading, onRefresh, }: CityDetailPanelProps) { if (!detail) { return ( City Detail Select a city from the left list or map marker. ); } const symbol = detail.temp_symbol || "C"; const displayTemp = detail.current?.max_so_far != null ? detail.current.max_so_far : detail.current?.temp; return (
{detail.display_name}
{detail.local_time || "--:--"} {detail.current?.wu_settlement != null ? ( WU {detail.current.wu_settlement} ) : null}
Current / Max
{displayTemp ?? "--"} {symbol}
DEB: {detail.deb?.prediction ?? "--"} {symbol}
Cloud

{detail.current?.cloud_desc || "N/A"}

Wind

{detail.current?.wind_speed_kt != null ? `${detail.current.wind_speed_kt} kt` : "N/A"}

AI Summary

); }