import { u as useViewHandler, S as SettingsHeader } from './index-bbdfb97a.js';
import { observer } from 'mobx-react-lite';
import 'react';
import { jsx, Fragment } from 'react/jsx-runtime';
import '@babel/runtime/helpers/defineProperty';
import 'react-dynamic-multi-render';
import '@crystaldesign/diva-core';
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 'classnames';
import 'qrcode.react';
import '@babel/runtime/helpers/typeof';
import 'flat';
import 'react-switch';
import 'react-countup';

var SettingsHeaderContainer = function SettingsHeaderContainer(_ref) {
  var _headerPalette$type, _headerPalette$type2;
  var _ref$isScroller = _ref.isScroller,
    isScroller = _ref$isScroller === void 0 ? false : _ref$isScroller;
  var viewHandler = useViewHandler();
  var headerPalette = viewHandler.settingsState.itemPalettes.get(1);
  if (!headerPalette) return /*#__PURE__*/jsx(Fragment, {});
  var headerStillNeeded = viewHandler.uiState.ViewConfig.headerInConfigPalette !== 'Hidden' || !headerPalette.hideHeader;
  var showHeader = headerStillNeeded && headerPalette.configStepKey !== 'CHECKOUT' && !((_headerPalette$type = headerPalette.type) !== null && _headerPalette$type !== void 0 && _headerPalette$type.startsWith('PRODUCTS')) && !((_headerPalette$type2 = headerPalette.type) !== null && _headerPalette$type2 !== void 0 && _headerPalette$type2.startsWith('PROMOTED')) && (!viewHandler.getIsInMobileView() || ['PLANNER_2.0', 'SUMMARY', 'ACCESSOIRES', 'DoorPlanner'].includes(headerPalette.configStepKey) || headerPalette.configStepKey.startsWith('SHELFARTICLE') || viewHandler.settingsState.showTabgroupHeaderForConfigSinge);
  return /*#__PURE__*/jsx(Fragment, {
    children: showHeader && /*#__PURE__*/jsx(SettingsHeader, {
      isInScroller: isScroller,
      isSettingsHeader: !headerPalette.isHeader,
      item: headerPalette,
      header: true
    })
  });
};
var SettingsHeaderContainer$1 = observer(SettingsHeaderContainer);

export { SettingsHeaderContainer$1 as default };
