import React from 'react';
import Head from 'next/head';
import { FacebookShareButton, FacebookIcon, TwitterShareButton, TwitterIcon, LinkedinShareButton, LinkedinIcon, PinterestShareButton, PinterestIcon, EmailShareButton, EmailIcon } from 'react-share';

var SocialShare = function SocialShare(props) {
  var shareUrl = props.shareUrl,
      shareTitle = props.shareTitle,
      shareVia = props.shareVia,
      shareSummary = props.shareSummary,
      shareSubject = props.shareSubject,
      shareImage = props.shareImage,
      size = props.size,
      siteName = props.siteName,
      twitterSiteName = props.twitterSiteName,
      _props$disableMeta = props.disableMeta,
      disableMeta = _props$disableMeta === undefined ? false : _props$disableMeta,
      hidePinterest = props.hidePinterest,
      hideFacebook = props.hideFacebook;

  return React.createElement(
    React.Fragment,
    null,
    !disableMeta && React.createElement(
      Head,
      null,
      React.createElement('meta', { property: 'og:url', content: shareUrl, key: 'og:url' }),
      React.createElement('meta', { property: 'og:title', content: shareTitle, key: 'og:title' }),
      React.createElement('meta', { property: 'og:image', content: shareImage, key: 'og:image' }),
      React.createElement('meta', { property: 'og:site_name', content: siteName, key: 'og:site_name' }),
      React.createElement('meta', { property: 'og:description', content: shareSummary, key: 'og:description' }),
      React.createElement('meta', { name: 'twitter:card', content: 'summary', key: 'og:card' }),
      React.createElement('meta', { name: 'twitter:title', content: shareTitle, key: 'og:title' }),
      React.createElement('meta', { name: 'twitter:image', content: shareImage, key: 'og:image' }),
      React.createElement('meta', { name: 'twitter:site', content: twitterSiteName, key: 'og:site' }),
      React.createElement('meta', { name: 'twitter:description', content: shareSummary, key: 'og:description' })
    ),
    !hideFacebook && React.createElement(
      FacebookShareButton,
      { url: shareUrl, quote: shareTitle },
      React.createElement(FacebookIcon, { size: size, round: true })
    ),
    React.createElement(
      TwitterShareButton,
      { url: shareUrl, title: shareTitle, via: shareVia },
      React.createElement(TwitterIcon, { size: size, round: true })
    ),
    React.createElement(
      LinkedinShareButton,
      { url: shareUrl, title: shareTitle, via: shareVia },
      React.createElement(LinkedinIcon, { size: size, round: true })
    ),
    !hidePinterest && React.createElement(
      PinterestShareButton,
      { url: shareUrl, media: shareImage, description: shareSummary },
      React.createElement(PinterestIcon, { size: size, round: true })
    ),
    React.createElement(
      EmailShareButton,
      { url: shareUrl, subject: shareSubject, body: shareSummary },
      React.createElement(EmailIcon, { size: size, round: true })
    )
  );
};

var SocialShare$1 = React.memo(SocialShare);

export default SocialShare$1;
