"use strict";

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

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

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

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

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

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

var _StepTitle = require("../StepTitle");

var _templateObject, _templateObject2;

var CheckoutHeader = function CheckoutHeader() {
  var labels = (0, _lib.useLocalLabels)();

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

  return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(StepsNavigation, null, /*#__PURE__*/_react["default"].createElement(Container, null, /*#__PURE__*/_react["default"].createElement("div", {
    className: "mx-4 d-flex"
  }, /*#__PURE__*/_react["default"].createElement(_StepTitle.StepTitle, {
    number: 1,
    step: _lib.CheckoutFormStepsEnum.Basket,
    link: "/basket",
    title: labels.bagStepTitle,
    isPrev: true
  }), /*#__PURE__*/_react["default"].createElement(_StepTitle.StepTitle, {
    number: 2,
    step: _lib.CheckoutFormStepsEnum.Shipping,
    title: labels.deliveryStepTitle,
    isPrev: currentStep !== _lib.CheckoutFormStepsEnum.Shipping
  }), /*#__PURE__*/_react["default"].createElement(_StepTitle.StepTitle, {
    number: 3,
    step: _lib.CheckoutFormStepsEnum.Payment,
    title: labels.paymentStepTitle,
    isPrev: currentStep === _lib.CheckoutFormStepsEnum.Preview
  }), /*#__PURE__*/_react["default"].createElement(_StepTitle.StepTitle, {
    number: 4,
    step: _lib.CheckoutFormStepsEnum.Preview,
    title: labels.completeStepTitle
  })))));
};

exports.CheckoutHeader = CheckoutHeader;

var Container = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2["default"])(["\n  max-width: 120rem;\n  margin: 0 auto;\n  width: 100%;\n"])));

var StepsNavigation = _styledComponents["default"].div.attrs({
  className: 'd-flex justify-content-start'
})(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2["default"])([""])));
//# sourceMappingURL=index.js.map