import { Gauge, Thermometer, Waves } from "lucide-react"; import type { DashboardOverview } from "../../dashboard/types/DashboardOverview"; import { StatusPill } from "../../dashboard/components/StatusPill"; type Props = { zones: DashboardOverview["climate"]["zones"]; }; function formatValue(value: number | null, unit: string, decimals = 1) { if (value === null) return "--"; return `${value.toFixed(decimals)} ${unit}`; } export function DashboardClimateSection({ zones }: Props) { return (

Clima por Zona

Temperatura, humidade, CO₂ e estados principais dos equipamentos.

{zones.map((zone) => (

Zona {zone.zoneNumber}

))}
); } type MiniValueProps = { icon: React.ElementType; label: string; value: string; }; function MiniValue({ icon: Icon, label, value }: MiniValueProps) { return (
{label}

{value}

); } type OpeningBarProps = { label: string; value: number | null; }; function OpeningBar({ label, value }: OpeningBarProps) { const safeValue = value ?? 0; return (
{label} {value === null ? "--" : `${value.toFixed(0)}%`}
); }