"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

exports.__esModule = true;
exports.ActionsWrapper = void 0;

var _taggedTemplateLiteralLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteralLoose"));

var _react = _interopRequireDefault(require("react"));

var _styledComponents = _interopRequireDefault(require("styled-components"));

var _Common = require("../../../../../Common");

var _lib = require("@sentecacommerce-theme/lib");

var _templateObject, _templateObject2;

var ActionsWrapper = function ActionsWrapper(_ref) {
  var isAlreadyInWishlist = _ref.isAlreadyInWishlist,
      handleMoveToWishlist = _ref.handleMoveToWishlist,
      handleRemoveFromBasket = _ref.handleRemoveFromBasket;

  // const [openModal, Modal] = useConfirm(handleRemoveFromBasket)
  var _useGlobalLabels = (0, _lib.useGlobalLabels)(),
      buttons = _useGlobalLabels.buttons;

  var labels = (0, _lib.useLocalLabels)();
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Common.Confirm, {
    cancelCallback: function cancelCallback() {},
    confirmCallback: handleRemoveFromBasket
  }), /*#__PURE__*/_react["default"].createElement(CTA, null, handleMoveToWishlist && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(CTAElement, {
    onClick: handleMoveToWishlist
  }, isAlreadyInWishlist ? labels.alreadyInFavorites : labels.moveToFavorites)), /*#__PURE__*/_react["default"].createElement(CTAElement, {
    onClick: handleRemoveFromBasket
  }, buttons.remove)));
};

exports.ActionsWrapper = ActionsWrapper;

var CTA = _styledComponents["default"].div.attrs({
  className: 'd-flex align-items-end'
})(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2["default"])(["\n  color: ", ";\n  margin-right: 5px;\n  line-height: 1.55rem;\n  margin-top: 0.3rem;\n"])), function (_ref2) {
  var theme = _ref2.theme;
  return theme.palette.hint;
});

var CTAElement = _styledComponents["default"].span.attrs({
  className: 'mr-4 d-none d-md-block'
})(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2["default"])(["\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