import _taggedTemplateLiteralLoose from "@babel/runtime/helpers/taggedTemplateLiteralLoose";

var _templateObject;

import React from 'react';
import { Portal } from '@sentecacommerce-theme/lib';
import styled from 'styled-components';
export var StickyAddToBasket = (_ref) => {
  var {
    children,
    show
  } = _ref;
  return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(StickyButton, {
    show: show,
    mobile: true
  }, children));
};
var StickyButton = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n  background: ", ";\n  // border-top: 1px solid rgba(0, 0, 0, 0.2);\n  box-shadow: -1px 0 3px 0 #ccc;\n  width: 100%;\n  position: fixed;\n  bottom: 0;\n  left: 0;\n  z-index: 10;\n\n  transition: opacity 0.2s ease, transform 0.15s ease;\n  transform: ", ";\n  opacity: ", ";\n\n  @media (min-width: ", ") {\n    display: ", ";\n  }\n"])), (_ref2) => {
  var {
    theme
  } = _ref2;
  return theme.palette.secondary;
}, props => props.show ? 'translateY(0)' : 'translateY(100%)', props => props.show ? '1' : '0', (_ref3) => {
  var {
    theme
  } = _ref3;
  return theme.breakpoints.lg.min;
}, props => props.mobile ? 'none' : 'block');
//# sourceMappingURL=index.js.map