import React from 'react';
import { SocialButtonFacebook as FacebookIcon, SocialButtonInstagram as InstagramIcon, SocialButtonLinkedIn as LinkedInIcon, SocialButtonPinterest as PinterestIcon, SocialButtonTwitter as TwitterIcon, SocialButtonYoutube as YoutubeIcon, SocialButtonX as XIcon, } from '@wix/wix-ui-icons-common/system';
import Text from '../Text';
import { st, classes } from './SocialButton.st.css.js';
import { dataHooks } from './constants';
import ButtonCore from '../Button/ButtonCore';
const iconMap = {
    facebook: FacebookIcon,
    instagram: InstagramIcon,
    twitter: TwitterIcon,
    linkedin: LinkedInIcon,
    pinterest: PinterestIcon,
    youtube: YoutubeIcon,
    xcorp: XIcon,
};
const Icon = React.memo(props => {
    const { icon, disabled, dataHook, text } = props;
    const SocialIcon = iconMap[icon];
    return (React.createElement(ButtonCore, { className: st(classes.icon, { type: icon, disabled, single: !text }), "data-hook": dataHook }, !!iconMap[icon] && React.createElement(SocialIcon, null)));
});
/** Social networks share button with title */
const SocialButton = ({ dataHook, text, onClick, icon, disabled }) => {
    return (React.createElement("div", { className: st(classes.root, { disabled }), "data-hook": dataHook, onClick: disabled ? undefined : onClick },
        React.createElement(Icon, { dataHook: dataHooks.socialIcon, text: text, icon: icon, disabled: disabled }),
        text && (React.createElement(Text, { size: "small", dataHook: dataHooks.socialTitle, skin: disabled ? 'disabled' : 'standard' }, text))));
};
SocialButton.displayName = 'SocialButton';
export default SocialButton;
//# sourceMappingURL=SocialButton.js.map