{#if daily?.time}
7-Day Forecast
{#each daily.time as day, i} {#if i < 7} {@const info = getWeatherInfo(daily.weather_code[i])} {@const tempMax = Math.round(daily.temperature_2m_max[i])} {@const tempMin = Math.round(daily.temperature_2m_min[i])} {@const precip = daily.precipitation_probability_max?.[i] || 0} {@const wind = daily.wind_speed_10m_max?.[i]}
{getDayName(day, i)}
{formatDay(day, i)}
{info.icon}
{info.label}
{tempMax}{unit}
/ {tempMin}{unit}
{#if precip > 0}
💧
{precip}%
{/if} {#if wind > 0}
💨 {Math.round(wind)} {windUnit}
{/if}
{/if} {/each}
{/if}