import React from 'react';
import Link from 'next/link';
import { Button } from '../../../';
import { useBasketTotalCount, useUIFunctions, useConfigState, useGlobalLabels } from '@sentecacommerce-theme/lib';
export var OnAddToBagCTA = (_ref) => {
  var {
    isAuthenticated,
    handleClose
  } = _ref;
  var {
    views
  } = useConfigState();
  var bagCount = useBasketTotalCount();
  var {
    enqueueView
  } = useUIFunctions();

  var handleClick = () => {
    enqueueView(views.auth, {
      isCheckout: true
    });
    handleClose();
  };

  var {
    buttons
  } = useGlobalLabels();
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Link, {
    href: "/basket",
    prefetch: false
  }, /*#__PURE__*/React.createElement(Button, {
    variant: "light",
    bordered: true,
    onClick: handleClose
  }, buttons.viewBag, " (", bagCount, ")")), isAuthenticated ? /*#__PURE__*/React.createElement(Link, {
    href: "/checkout",
    prefetch: false
  }, /*#__PURE__*/React.createElement(Button, {
    className: "ml-sm-4",
    variant: "primary",
    onClick: handleClose
  }, buttons.checkout)) : /*#__PURE__*/React.createElement(Button, {
    onClick: handleClick,
    className: "ml-sm-4",
    variant: "primary"
  }, buttons.checkout));
};
export var OnAddToWishlistCTA = (_ref2) => {
  var {
    handleClose
  } = _ref2;
  return /*#__PURE__*/React.createElement(Link, {
    href: "/favorites",
    prefetch: false
  }, /*#__PURE__*/React.createElement(Button, {
    variant: "primary",
    fullWidth: true,
    borderRadius: "large",
    onClick: handleClose
  }, "View Favorites"));
};
//# sourceMappingURL=index.js.map