'use client' import { AlertTriangle } from 'lucide-react' interface WeightAlertProps { currentKg: number previousKg: number timeframeHours: number } export function WeightAlert({ currentKg, previousKg, timeframeHours }: WeightAlertProps) { const diff = Math.abs(currentKg - previousKg) if (diff < 2) return null const direction = currentKg > previousKg ? 'gained' : 'lost' return (

Rapid Weight Change

{direction} {diff.toFixed(1)} kg in the last {timeframeHours < 24 ? `${timeframeHours} hours` : `${Math.round(timeframeHours / 24)} days`}. Rapid changes may indicate fluid retention or other concerns — consider contacting your care team.

) }