import { ActionIcon, Box, Card, Group, Stack, Text } from '@mantine/core'; import { useCommonHooks } from 'hooks'; import { FaLocationArrow, FaSun, FaWind } from 'react-icons/fa'; import { FaDroplet, FaX } from 'react-icons/fa6'; import { WiRain, WiSunrise, WiSunset } from 'react-icons/wi'; import { textClasses } from 'styles'; import { WeatherCodes } from 'types'; import WeatherFeaturePill from './WeatherFeaturePill'; import WeatherGraphs from './WeatherGraphs'; import WeatherIcon from './WeatherIcon'; export default function ExtendedForecastDetails({ selectedDay, setSelectedDay, selectedHourly, setSelectedHourly, }: { selectedDay: any; setSelectedDay: (day: any) => void; selectedHourly: any; setSelectedHourly: (hourly: any) => void; }) { const { isMobile } = useCommonHooks(); return ( { e.stopPropagation(); }} p={0} > { setSelectedDay(undefined); setSelectedHourly(undefined); }} > {selectedDay.time.toLocaleDateString('en-US', { weekday: 'long' })} {selectedDay.time.toLocaleDateString()} Feels like} rightSide={ {selectedDay.apparentTemperatureMax?.toFixed(0) ?? selectedDay.temperatureMax?.toFixed(0)} °F } highlight='right' /> {selectedDay.temperatureMax?.toFixed(0)} °F / {selectedDay.temperatureMin?.toFixed(0)}°F 25 ? 'flex-start' : 'center' } style={{ width: '100%', maxWidth: '180px', whiteSpace: 'nowrap', overflow: 'hidden', boxSizing: 'border-box', position: 'relative', }} > 25 ? textClasses.autoScrollText : undefined } classNames={textClasses} style={{ lineHeight: 1 }} > {selectedDay.temperature_2m?.toFixed(0) === '69' ? 'Nice' : WeatherCodes[Number(selectedDay.weatherCode)]} Wind } rightSide={{selectedDay.windSpeed?.toFixed(0)}mph} highlight='right' /> Gusts } rightSide={{selectedDay.windGusts?.toFixed(0)}mph} highlight='right' /> {selectedDay.windDirection?.toFixed(0)}° UV {selectedDay.uvIndexMax?.toFixed(0)} } rightSide={{selectedDay.sunrise}} highlight='left' /> } rightSide={{selectedDay.sunset}} highlight='left' /> Precipitation % } rightSide={{selectedDay.precipitationProbability}%} highlight='right' /> Precipitation In. } rightSide={{selectedDay.precipitationSum.toFixed(2)} in.} highlight='right' /> ); }