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

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

export { SocialShare$1 as default };
