import { s as styleInject, u as useViewHandler, e as evalVisible, g as b, _ as _onClickCheckout, I as Icon } from './index-bbdfb97a.js';
import 'react';
import { observer } from 'mobx-react-lite';
import classnames from 'classnames';
import { useTranslation } from '@crystaldesign/diva-core';
import StyleIndicator from './index-f23819fe.js';
import { jsxs, jsx } from 'react/jsx-runtime';
import '@babel/runtime/helpers/defineProperty';
import 'react-dynamic-multi-render';
import '@babel/runtime/helpers/asyncToGenerator';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/objectWithoutProperties';
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 wcFunctionsToolbar = "wcFunctionsToolbar-33mKP";
var mobile = "mobile--gThy";
var css_248z = ".wcFunctionsToolbar-33mKP {\n  position: absolute;\n  top: 0px;\n  right: 0px;\n  margin-top: 0px;\n  padding-left: 0;\n  padding-left: initial;\n  display: flex;\n  align-items: center;\n  justify-content: flex-end;\n  gap: 12px;\n}\n.mobile--gThy.wcFunctionsToolbar-33mKP {\n  margin-top: 8px;\n}\n\n.wcFunctionsToolbar-33mKP li {\n  border-radius: var(--globalBorderRadius);\n  list-style: none;\n  transition: box-shadow 0.15s ease;\n  display: flex;\n  align-items: center;\n}\n.wcFunctionsToolbar-33mKP li:hover {\n  box-shadow: var(--boxShadowHover);\n}\n\n.wcFunctionsToolbar-33mKP li:active {\n  box-shadow: var(--boxShadowActive);\n}\n\n#wcSetSelector-zDZtd {\n  float: left;\n  padding-right: 1em;\n  padding-top: 0.5rem;\n}\n";
styleInject(css_248z);

var HeaderFunctions = function HeaderFunctions(props) {
  var _viewHandler$uiState$;
  var viewHandler = useViewHandler();
  var _useTranslation = useTranslation(),
    t = _useTranslation.t;
  return /*#__PURE__*/jsxs("ul", {
    className: classnames(wcFunctionsToolbar, viewHandler.getIsInMobileView() ? mobile : undefined),
    children: [/*#__PURE__*/jsx(StyleIndicator, {}), (_viewHandler$uiState$ = viewHandler.uiState.checkoutConfig) === null || _viewHandler$uiState$ === void 0 ? void 0 : _viewHandler$uiState$.buttons.filter(function (b) {
      return evalVisible(b, viewHandler, 'header');
    }).map(function (b$1) {
      return /*#__PURE__*/jsx("li", {
        className: classnames(b),
        onClick: function onClick() {
          return _onClickCheckout(b$1, viewHandler, b$1.index, t);
        },
        children: /*#__PURE__*/jsx(Icon, {
          checkoutButton: b$1,
          size: 32,
          showTitle: !viewHandler.getIsInMobileView() || viewHandler.uiState.isTablet
        })
      }, b$1.index);
    })]
  });
};
var Functions = observer(HeaderFunctions);

export { Functions as default };
