import { s as styleInject, 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, Fragment, jsxs } 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 wcConfiguratorProductFooter = "wcConfigurator-product-footer-SQUKh";
var portrait = "portrait-begxM";
var landscape = "landscape-m3RkP";
var expanded = "expanded-D5PIt";
var wcButton = "wcButton-2kxBv";
var sel = "sel-4wfuc";
var wcViewAs = "wc_ViewAs-QJyAI";
var css_248z = "/* footer */\n\n.wcConfigurator-product-footer-SQUKh {\n  text-align: center;\n  z-index: 350;\n  position: absolute;\n  bottom: 0px;\n  left: 50%;\n  transform: translate(-50%, 0);\n  display: flex;\n  gap: 10px;\n}\n\n.portrait-begxM.wcConfigurator-product-footer-SQUKh {\n  display: none;\n}\n\n.landscape-m3RkP.wcConfigurator-product-footer-SQUKh {\n  display: none;\n}\n\n.expanded-D5PIt.wcConfigurator-product-footer-SQUKh {\n  left: 20%;\n  transform: translate(-40%, 0);\n}\n\n.wcConfigurator-product-footer-SQUKh .wcButton-2kxBv.sel-4wfuc,\n.wcConfigurator-product-footer-SQUKh .wcButton-2kxBv.sel-4wfuc:hover {\n  background: #262626;\n  color: white;\n}\n\n.wcConfigurator-product-footer-SQUKh .wcButton-2kxBv:active,\n.wcConfigurator-product-footer-SQUKh .wcButton-2kxBv.sel-4wfuc:active {\n  background: #262626;\n  color: white;\n}\n\n.wcConfigurator-product-footer-SQUKh .wcButton-2kxBv {\n  background: white;\n  box-sizing: border-box;\n  -webkit-text-stroke: 0.6px;\n  min-width: 150px;\n  width: auto;\n  height: 38.4px;\n  line-height: 35.8px;\n  color: var(--secondaryColor);\n  border-radius: var(--globalBorderRadius);\n  border: 1px solid #262626;\n}\n\n.portrait-begxM.wcConfigurator-product-footer-SQUKh .wcButton-2kxBv {\n  min-width: 140px;\n}\n.wcConfigurator-product-footer-SQUKh .wcButton-2kxBv:hover {\n  color: var(--secondaryColor);\n  background: white;\n  box-shadow: var(--boxShadowHover);\n}\n\n/* ViewAs  */\n.wc_ViewAs-QJyAI {\n  text-align: center;\n  z-index: 10;\n  margin: 0;\n  padding: 0;\n  border-width: 0;\n  list-style: none;\n  white-space: nowrap;\n  display: flex;\n  flex-direction: row;\n  vertical-align: middle;\n  position: relative;\n  flex-wrap: nowrap;\n  gap: 10px;\n  cursor: pointer;\n}\n\n.wc_ViewAs-QJyAI li {\n  display: block;\n}\n";
styleInject(css_248z);

var ProductFooter = function ProductFooter(props) {
  var _viewHandler$divaWebP, _viewHandler$tabGroup, _viewHandler$tabGroup2;
  var viewHandler = useViewHandler();
  var _useTranslation = useTranslation(),
    t = _useTranslation.t;
  var renderings = (_viewHandler$divaWebP = viewHandler.divaWebPlanner.getAlternateRenderingsForSummary()) !== null && _viewHandler$divaWebP !== void 0 ? _viewHandler$divaWebP : [];
  if (viewHandler.productState.footerVisible.length <= 1 && (((_viewHandler$tabGroup = viewHandler.tabGroupState.curTabGroup) === null || _viewHandler$tabGroup === void 0 ? void 0 : _viewHandler$tabGroup.type) != 'SUMMARY' || !renderings.length)) return /*#__PURE__*/jsx(Fragment, {});
  if (viewHandler.uiState.ViewConfig.roomListInProduct && viewHandler.productState.roomListExpanded && viewHandler.settingsState.roomListInitialized) return /*#__PURE__*/jsx(Fragment, {});
  return /*#__PURE__*/jsx("div", {
    className: classnames(wcConfiguratorProductFooter, viewHandler.uiState.isMobileLandscape ? landscape : undefined, viewHandler.uiState.isMobilePortrait ? portrait : undefined, viewHandler.uiState.configSettingsIsExpanded ? expanded : undefined),
    children: /*#__PURE__*/jsxs("ul", {
      className: wcViewAs,
      children: [viewHandler.productState.allow3DComb && /*#__PURE__*/jsx("li", {
        className: classnames(wcButton, viewHandler.productState.doShow3DComb ? sel : undefined),
        onClick: function onClick() {
          return viewHandler.productState.onChangePlannerView('3DCOMB');
        },
        children: t('configurator.Foto')
      }), viewHandler.productState.allowGrid && /*#__PURE__*/jsx("li", {
        className: classnames(wcButton, viewHandler.productState.doShowGrid ? sel : undefined),
        onClick: function onClick() {
          return viewHandler.productState.onChangePlannerView('2D');
        },
        children: t('configurator.Grundriss')
      }), viewHandler.productState.allowRendering && /*#__PURE__*/jsxs(Fragment, {
        children: [/*#__PURE__*/jsx("li", {
          className: classnames(wcButton, viewHandler.productState.doShowRenderImage && viewHandler.productState.curAlternateRendering === undefined ? sel : undefined),
          onClick: function onClick() {
            return viewHandler.productState.onChangePlannerView('3D');
          },
          children: t('configurator.Foto')
        }), ((_viewHandler$tabGroup2 = viewHandler.tabGroupState.curTabGroup) === null || _viewHandler$tabGroup2 === void 0 ? void 0 : _viewHandler$tabGroup2.type) == 'SUMMARY' && renderings.map(function (rendering) {
          var _viewHandler$productS;
          return /*#__PURE__*/jsx("li", {
            className: classnames(wcButton, viewHandler.productState.doShowRenderImage && ((_viewHandler$productS = viewHandler.productState.curAlternateRendering) === null || _viewHandler$productS === void 0 ? void 0 : _viewHandler$productS.imageCodex) === rendering.imageCodex ? sel : undefined),
            onClick: function onClick() {
              return viewHandler.productState.onChangePlannerView('3D', rendering);
            },
            children: rendering.title
          });
        })]
      }), viewHandler.productState.allowRTV && /*#__PURE__*/jsx("li", {
        className: classnames(wcButton, viewHandler.productState.doShowRTV ? sel : undefined),
        onClick: function onClick() {
          return viewHandler.productState.onChangePlannerView('RTV');
        },
        children: t('configurator.RTV')
      })]
    })
  });
};
var index = observer(ProductFooter);

export { index as default };
