"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.TourFooter = void 0;
var _react = _interopRequireDefault(require("react"));
var _faChevronRight = require("@fortawesome/free-solid-svg-icons/faChevronRight");
var _faChevronLeft = require("@fortawesome/free-solid-svg-icons/faChevronLeft");
var _faCheck = require("@fortawesome/free-solid-svg-icons/faCheck");
var _button = require("../../button");
var _useTranslation = require("../../hooks/use-translation");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/**
 * Component contains buttons to change the step or skip tour.
 * */
const TourFooter = ({
  skipButtonText,
  stepNumber,
  totalSteps,
  onCompleteHandler,
  onNextHandler,
  onPrevHandler,
  onSkipHandler
}) => {
  const {
    t
  } = (0, _useTranslation.useTranslation)();
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
    className: "tour-footer",
    "test-id": "tour-footer",
    children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
      className: "tour-footer-skip-btn",
      onClick: () => onSkipHandler(stepNumber),
      accentType: _button.ACCENT_TYPES.GHOST,
      testId: "tour-skip-btn",
      children: skipButtonText ?? t('Skip tour')
    }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
      className: "tour-footer-direction-btn",
      onClick: onPrevHandler,
      accentType: _button.ACCENT_TYPES.ROUND_ICON,
      leftIcon: _faChevronLeft.faChevronLeft,
      isDisabled: stepNumber === 1,
      testId: "tour-prev-btn",
      "aria-label": t('previous')
    }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
      "test-id": "tour-steps-counter",
      children: `${stepNumber}/${totalSteps}`
    }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
      className: "tour-footer-direction-btn",
      onClick: stepNumber === totalSteps ? onCompleteHandler : onNextHandler,
      accentType: _button.ACCENT_TYPES.ROUND_ICON,
      rightIcon: stepNumber === totalSteps ? _faCheck.faCheck : _faChevronRight.faChevronRight,
      testId: "tour-next-btn",
      "aria-label": t('next')
    })]
  });
};
exports.TourFooter = TourFooter;