
import sunnyIcon from '../assets/icons/clear-day.svg'
import cloudyIcon from '../assets/icons/cloudy.svg'
import rainyIcon from '../assets/icons/rainy.svg'
import snowyIcon from '../assets/icons/snowy.svg'
import thunderIcon from '../assets/icons/thunderstorms.svg'
import fogIcon from '../assets/icons/fog.svg'

const getWeatherIcon = (status) => {
    const statusMap = {
        'солнечно': 'clear-day',
        'облачно': 'cloudy',
        'мелкий дождь': 'rainy',
        'дождливо': 'rainy',
        'снег': 'snowy',
        'гроза': 'thunderstorms',
        'туман': 'fog',
        'clear-day': 'clear-day',
        'cloudy': 'cloudy',
        'rainy': 'rainy',
        'snowy': 'snowy',
        'thunderstorms': 'thunderstorms',
        'fog': 'fog',
    };
    const normalizedStatus = statusMap[status] || status;

    switch (normalizedStatus) {
        case 'clear-day':
            return sunnyIcon;
        case 'cloudy':
            return cloudyIcon;
        case 'rainy':
            return rainyIcon;
        case 'snowy':
            return snowyIcon;
        case 'thunderstorms':
            return thunderIcon;
        case 'fog':
            return fogIcon;
        default:
            return sunnyIcon;
    }
}

export default getWeatherIcon;
