'use client'
interface WeatherAnimationProps {
condition: string
size?: number
}
function getCondition(desc: string): 'clear' | 'partly' | 'cloudy' | 'rain' | 'snow' | 'thunder' | 'fog' {
const d = desc?.toLowerCase() || ''
if (d.includes('гроз')) return 'thunder'
if (d.includes('снег') || d.includes('снегопад')) return 'snow'
if (d.includes('дождь') || d.includes('ливен') || d.includes('морос')) return 'rain'
if (d.includes('туман')) return 'fog'
if (d.includes('пасмурн')) return 'cloudy'
if (d.includes('облач') || d.includes('перем')) return 'partly'
return 'clear'
}
export default function WeatherAnimation({ condition, size = 64 }: WeatherAnimationProps) {
const c = getCondition(condition)
const s = size
return (
)
}