"use client"; import clsx from "clsx"; type RunwayPlate = { rwy: string; isSettlement: boolean; tdzTemp: number | null; midTemp: number | null; endTemp: number | null; maxTemp: number | null; dailyHigh: number | null; trend_15m: number | null; }; export function TemperatureRunwayDetails({ isEn, plates, tempSymbol, }: { isEn: boolean; plates: RunwayPlate[]; tempSymbol: string; }) { if (!plates.length) return null; return (
{isEn ? "Runway Observations" : "跑道观测"} {plates.some((p) => p.trend_15m !== null && p.trend_15m > 0 && !p.isSettlement) && ( {isEn ? "Non-settlement Runway Warming Alert" : "非结算跑道升温提醒"} )}
{plates.map((plate) => (
{plate.isSettlement && } {plate.rwy} {plate.isSettlement && ( {isEn ? "Settlement" : "结算"} )}
TDZ: {plate.tdzTemp !== null ? `${plate.tdzTemp.toFixed(1)}${tempSymbol}` : "--"}
MID: {plate.midTemp !== null ? `${plate.midTemp.toFixed(1)}${tempSymbol}` : "--"}
END: {plate.endTemp !== null ? `${plate.endTemp.toFixed(1)}${tempSymbol}` : "--"}
max: {plate.maxTemp !== null ? `${plate.maxTemp.toFixed(1)}${tempSymbol}` : "--"}
high: {plate.dailyHigh !== null ? `${plate.dailyHigh.toFixed(1)}${tempSymbol}` : "--"}
0 ? "text-orange-600 font-bold" : "text-slate-500")}> 15m: {plate.trend_15m !== null ? `${plate.trend_15m >= 0 ? "+" : ""}${plate.trend_15m.toFixed(1)}${tempSymbol}` : "--"}
))}
); }