import React, { FC } from 'react';

import IconDevicesSVG from '../../assets/icons/categories/icon-devices-white.svg';
import IconFridgeSVG from '../../assets/icons/categories/icon-fridge.svg';
import IconLightSVG from '../../assets/icons/categories/icon-light.svg';
import IconPhoneSVG from '../../assets/icons/categories/icon-phone.svg';
import IconSmarthomeSVG from '../../assets/icons/categories/icon-smarthome.svg';
import IconWifiSVG from '../../assets/icons/categories/icon-wifi.svg';
import IconSpeakerSVG from '../../assets/icons/categories/icon-speaker.svg';
import IconTvSVG from '../../assets/icons/categories/icon-tv.svg';
import IconAccountSVG from '../../assets/icons/icon_user.svg';
import IconBubbleSVG from '../../assets/icons/categories/icon-individualsupport.svg';
import IconRemoteSupportSVG from '../../assets/icons/categories/icon-remote-support.svg';

interface IconCategory {
  name: string;
}
const IconLoader: FC<IconCategory> = ({ name, ...rest }) => {
  switch (name) {
    case 'mila-icon-tv_video':
    case 'tv': {
      return <IconTvSVG {...rest} />;
    }
    case 'mila-icon-wifi': {
      return <IconWifiSVG {...rest} />;
    }
    case 'mila-icon-computer': {
      return <IconDevicesSVG {...rest} />;
    }
    case 'mila-icon-lightning': {
      return <IconSmarthomeSVG {...rest} />;
    }
    case 'mila-icon-mobile_smart': {
      return <IconPhoneSVG {...rest} />;
    }
    case 'mila-icon-audio': {
      return <IconSpeakerSVG {...rest} />;
    }
    case 'mila-icon-neighbours': {
      return <IconBubbleSVG {...rest} />;
    }
    case 'mila-icon-light':
    case 'mila-icon-light-lumimart': {
      // if we want to customize it later
      return <IconLightSVG {...rest} />;
    }
    case 'mila-icon-home-garden': {
      return <IconFridgeSVG {...rest} />;
    }
    case 'account': {
      return <IconAccountSVG {...rest} />;
    }
    case 'mila-icon-remote-support': {
      return <IconRemoteSupportSVG {...rest} />;
    }
    default: {
      return <></>;
    }
  }
};

export default IconLoader;
