import {
    FaGoogle,
    FaOdnoklassnikiSquare,
    FaVk,
    FaYandex,
} from 'react-icons/fa';
import { SiMaildotru } from 'react-icons/si';

import type { SocialNetworkType } from '@/utils/socialAuth';

const SocialIcon = ({
    type,
    mobile = false,
    size,
}: {
    type: SocialNetworkType | string;
    mobile?: boolean;
    size?: number;
}) => {
    const iconSize = size ?? (mobile ? 20 : 30);

    switch (type) {
        case 'vk':
            return <FaVk size={iconSize} className="text-blue-600" />;
        case 'ya':
            return <FaYandex size={iconSize} className="text-red-600" />;
        case 'google':
            return <FaGoogle size={iconSize} className="text-gray-600" />;
        case 'ok':
            return <FaOdnoklassnikiSquare size={iconSize} className="text-orange-600" />;
        case 'mailru':
            return <SiMaildotru size={iconSize} className="text-blue-600" />;
        default:
            return null;
    }
};

export default SocialIcon;
