import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
import _defineProperty from '@babel/runtime/helpers/defineProperty';
import { u as useViewHandler } from './index-bbdfb97a.js';
import classnames from 'classnames';
import { observer } from 'mobx-react-lite';
import 'react';
import { useTranslation } from '@crystaldesign/diva-core';
import { jsx, jsxs } from 'react/jsx-runtime';
import 'react-dynamic-multi-render';
import '@babel/runtime/helpers/asyncToGenerator';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/regenerator';
import '@babel/runtime/helpers/classCallCheck';
import '@babel/runtime/helpers/createClass';
import '@babel/runtime/helpers/toConsumableArray';
import '@crystaldesign/diva-utils';
import 'mobx';
import '@crystaldesign/web-planner-logic';
import 'qrcode.react';
import '@babel/runtime/helpers/typeof';
import 'flat';
import 'react-switch';
import 'react-countup';

var _excluded = ["className"];
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var buttonBase = {
  padding: '4px 15px',
  borderRadius: 6,
  border: '1px solid #d9d9d9',
  cursor: 'pointer',
  fontSize: 14,
  lineHeight: '22px',
  background: '#fff',
  color: 'rgba(0,0,0,0.88)'
};
var primaryButton = _objectSpread(_objectSpread({}, buttonBase), {}, {
  background: 'var(--primaryColor, #1677ff)',
  borderColor: 'var(--primaryColor, #1677ff)',
  color: '#fff'
});
var ActionNavigation = function ActionNavigation(_ref) {
  var className = _ref.className,
    props = _objectWithoutProperties(_ref, _excluded);
  var viewHandler = useViewHandler();
  var _useTranslation = useTranslation(),
    t = _useTranslation.t;
  var _viewHandler$actionBu = viewHandler.actionButtonState,
    isOnFirstStep = _viewHandler$actionBu.isOnFirstStep,
    isOnFirstStepDisabled = _viewHandler$actionBu.isOnFirstStepDisabled,
    isOnLastStep = _viewHandler$actionBu.isOnLastStep;
  return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({}, props), {}, {
    className: classnames(className),
    children: /*#__PURE__*/jsxs("div", {
      style: {
        display: 'flex',
        gap: 8,
        flexWrap: 'wrap'
      },
      children: [!isOnFirstStep && /*#__PURE__*/jsx("button", {
        style: buttonBase,
        onClick: function onClick() {
          window.lastNavigationType = 'NAVIGATION_STANDARD_BACK_BUTTON';
          viewHandler.actionButtonState.onClickConfiguratorSettingsBack();
        },
        children: t('configurator.Back')
      }), !isOnLastStep && /*#__PURE__*/jsx("button", {
        id: "wcConfigurator-action-next",
        style: _objectSpread(_objectSpread({}, primaryButton), {}, {
          opacity: isOnFirstStepDisabled ? 0.5 : 1
        }),
        disabled: isOnFirstStepDisabled,
        onClick: function onClick() {
          window.lastNavigationType = 'NAVIGATION_STANDARD_FORWARD_BUTTON';
          viewHandler.actionButtonState.onClickConfiguratorSettingsForth();
        },
        children: t('configurator.Next')
      })]
    })
  }));
};
var index = observer(ActionNavigation);

export { index as default };
