export type Icon =
    | 'twitter'
    | 'bandcamp'
    | 'discord'
    | 'envelope'
    | 'soundcloud'
    | 'teespring'
import styles from "../styles/Icons.module.sass"
import {
    FaBandcamp,
    FaDiscord,
    FaEnvelope,
    FaSoundcloud,
    FaTwitter,
} from 'react-icons/fa'
import { SiSpringCreators } from 'react-icons/si'
const Icon = ({
    icon,
    className,
}: {
    icon: Icon | string
    className?: string
}) => {
    const size = '3rem'
    switch (icon) {
        case 'twitter':
            return (
                <FaTwitter
                    className={[styles.icon, styles[className]].join(' ')}
                    size={size}
                />
            )
        case 'bandcamp':
            return (
                <FaBandcamp
                    className={[styles.icon, styles[className]].join(' ')}
                    size={size}
                />
            )
        case 'discord':
            return (
                <FaDiscord
                    className={[styles.icon, styles[className]].join(' ')}
                    size={size}
                />
            )
        case 'envelope':
            return (
                <FaEnvelope
                    className={[styles.icon, styles[className]].join(' ')}
                    size={size}
                />
            )
        case 'soundcloud':
            return (
                <FaSoundcloud
                    className={[styles.icon, styles[className]].join(' ')}
                    size={size}
                />
            )
        case 'teespring':
            return (
                <SiSpringCreators
                    className={[styles.icon, styles[className]].join(' ')}
                    size={size}
                />
            )
    }
}

export default Icon
