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

var _templateObject, _templateObject2;

import React from 'react';
import styled from 'styled-components';
import { Confirm } from '../../../../../Common';
import { useGlobalLabels, useLocalLabels } from '@sentecacommerce-theme/lib';
export var ActionsWrapper = (_ref) => {
  var {
    isAlreadyInWishlist,
    handleMoveToWishlist,
    handleRemoveFromBasket
  } = _ref;
  // const [openModal, Modal] = useConfirm(handleRemoveFromBasket)
  var {
    buttons
  } = useGlobalLabels();
  var labels = useLocalLabels();
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Confirm, {
    cancelCallback: () => {},
    confirmCallback: handleRemoveFromBasket
  }), /*#__PURE__*/React.createElement(CTA, null, handleMoveToWishlist && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CTAElement, {
    onClick: handleMoveToWishlist
  }, isAlreadyInWishlist ? labels.alreadyInFavorites : labels.moveToFavorites)), /*#__PURE__*/React.createElement(CTAElement, {
    onClick: handleRemoveFromBasket
  }, buttons.remove)));
};
var CTA = styled.div.attrs({
  className: 'd-flex align-items-end'
})(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n  color: ", ";\n  margin-right: 5px;\n  line-height: 1.55rem;\n  margin-top: 0.3rem;\n"])), (_ref2) => {
  var {
    theme
  } = _ref2;
  return theme.palette.hint;
});
var CTAElement = styled.span.attrs({
  className: 'mr-4 d-none d-md-block'
})(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n  margin-top: 0.01rem;\n  text-decoration: underline;\n  cursor: pointer;\n\n  &:hover {\n    opacity: 0.7;\n  }\n"])));
//# sourceMappingURL=index.js.map