"use strict";

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

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

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

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

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

var _Payment = require("../Payment");

var _Shipping = require("../Shipping");

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

var _templateObject, _templateObject2;

var CheckoutSteps = function CheckoutSteps() {
  var _useCheckoutFormStep = (0, _lib.useCheckoutFormStep)(),
      currentStep = _useCheckoutFormStep.currentStep;

  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(BoxContainer, {
    isActive: currentStep === _lib.CheckoutFormStepsEnum.Shipping
  }, /*#__PURE__*/_react["default"].createElement(StepContent, null, currentStep === _lib.CheckoutFormStepsEnum.Shipping && /*#__PURE__*/_react["default"].createElement(_Shipping.CheckoutShipping, null))), /*#__PURE__*/_react["default"].createElement(BoxContainer, {
    isActive: currentStep === _lib.CheckoutFormStepsEnum.Payment
  }, /*#__PURE__*/_react["default"].createElement(StepContent, null, currentStep === _lib.CheckoutFormStepsEnum.Payment && /*#__PURE__*/_react["default"].createElement(_Payment.CheckoutPayment, null))));
};

exports.CheckoutSteps = CheckoutSteps;

var StepContent = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2["default"])([""])));

var BoxContainer = _styledComponents["default"].div.attrs({
  className: 'px-4'
})(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2["default"])(["\n  display: ", ";\n"])), function (props) {
  return props.isActive ? 'block' : 'none';
});
//# sourceMappingURL=index.js.map