import React from 'react';
import {Image} from 'react-native';

interface SmallSocialIconProps {
  social: string;
  style: object;
}
/**
 * An image component that returns the <Image> of the icon for a specific social media platform.
 */
const SmallSocialIcon: React.FC<SmallSocialIconProps> = ({
  social: social,
  style: style,
}) => {
  switch (social) {
    case 'Instagram':
      var icon = require('../../assets/socials/instagram-icon-small.png');
      break;
    case 'Facebook':
      var icon = require('../../assets/socials/facebook-icon-small.png');
      break;
    case 'Twitter':
      var icon = require('../../assets/socials/twitter-icon-small.png');
      break;
    // TODO: Missing icon assets
    // case 'Twitch':
    //   var icon = require('../../assets/socials/twitch-icon-small.png');
    //   break;
    // case 'Pinterest':
    //   var icon = require('../../assets/socials/pinterest-icon-small.png');
    //   break;
    // case 'Whatsapp':
    //   var icon = require('../../assets/socials/whatsapp-icon-small.png');
    //   break;
    // case 'Linkedin':
    //   var icon = require('../../assets/socials/linkedin-icon-small.png');
    //   break;
    case 'Snapchat':
      var icon = require('../../assets/socials/snapchat-icon-small.png');
      break;
    case 'Youtube':
      var icon = require('../../assets/socials/youtube-icon-small.png');
      break;
    case 'TikTok':
      var icon = require('../../assets/socials/tiktok-icon-small.png');
      break;
    default:
      var icon = require('../../assets/socials/logo.png');
      break;
  }
  return <Image style={style} source={icon} />;
};

export default SmallSocialIcon;
