import _get from "lodash/fp/get";
import React from 'react';
import PropTypes from 'prop-types';
import Button from '../../atom/button';
import Link from '../../atom/link';
import Provider from '../../atom/provider';
import style from './style.css';
const CookieBanner = ({
  href,
  onClick
}, context) => {
  const {
    translate,
    skin
  } = context;
  const primary = _get('common.primary', skin);
  const intro = translate('cookies_title');
  const text = translate('cookies_details');
  const title = translate('cookies_policy');
  const ok = translate('Ok');
  const handleOnClick = onClick;
  return /*#__PURE__*/React.createElement("div", {
    className: style.banner
  }, /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("span", {
    className: style.intro
  }, intro), /*#__PURE__*/React.createElement("span", null, text), /*#__PURE__*/React.createElement(Link, {
    className: style.link,
    href: href,
    target: "_blank",
    style: {
      color: primary
    }
  }, title)), /*#__PURE__*/React.createElement(Button, {
    type: "link",
    "data-name": "cookie-banner-cta",
    className: style.button,
    submitValue: ok,
    onClick: handleOnClick,
    style: {
      backgroundColor: primary
    }
  }));
};
CookieBanner.contextTypes = {
  skin: Provider.childContextTypes.skin,
  translate: Provider.childContextTypes.translate
};
CookieBanner.propTypes = process.env.NODE_ENV !== "production" ? {
  href: PropTypes.string,
  onClick: PropTypes.func
} : {};
export default CookieBanner;
//# sourceMappingURL=index.js.map