import _defineProperty from '@babel/runtime/helpers/defineProperty';
import { u as useViewHandler } from './index-bbdfb97a.js';
import { observer } from 'mobx-react-lite';
import React, { Suspense } from 'react';
import Planner2DGrid from './index-b788a35a.js';
import Planner3DImage from './index-51c25e6a.js';
import PlannerAIRoom from './index-0c88d91e.js';
import { w as wcConfiguratorProductCenter, p as portrait, l as landscape, i as inGridVisible, f as fullscreen, a as wcConfiguratorArticleImage, c as center } from './index.module-19cb4aaa.js';
import classnames from 'classnames';
import Planner3DGrid from './index-0980b4b8.js';
import PlannerMsgContainer from './index-2d9c2031.js';
import PlannerUIVariant from './index-9c4fe1ee.js';
import RotateInfo from './index-dc78191b.js';
import OrbitInteraction from './index-aa356ee3.js';
import MobileNavIcons from './index-428e2823.js';
import Logo from './index-7a15caf2.js';
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
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 'qrcode.react';
import '@babel/runtime/helpers/typeof';
import 'flat';
import 'react-switch';
import 'react-countup';
import './index-10375806.js';
import 'swiper/react';
import 'swiper/modules';
import '@babel/runtime/helpers/objectDestructuringEmpty';
import './index-7167c5bc.js';
import 'react-laag';
import './index-5a146745.js';
import 'react-qr-code';
import './index-c648d661.js';
import './index-2da144c0.js';

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 Planner3D = /*#__PURE__*/React.lazy(function () {
  return import('./index-1f2729a7.js');
});
var PlannerRTV = /*#__PURE__*/React.lazy(function () {
  return import('./index-2232f6d1.js');
});
var ProductCenter = function ProductCenter(_ref) {
  var style = _ref.style;
  var viewHandler = useViewHandler();
  var allowOrbitCube = !viewHandler.uiState.ViewConfig.dontShowOrbitInMobile || !viewHandler.getIsInMobileView();
  return /*#__PURE__*/jsxs("div", {
    style: _objectSpread(_objectSpread({}, style), viewHandler.productState.isARIframeVisible ? {
      zIndex: 1000000
    } : {}),
    className: classnames(wcConfiguratorProductCenter, viewHandler.uiState.isMobilePortrait ? portrait : undefined, viewHandler.uiState.isMobileLandscape ? landscape : undefined, viewHandler.productState.doShowGrid ? inGridVisible : undefined, fullscreen),
    onMouseDown: function onMouseDown() {
      if (viewHandler.productState.roomListExpanded) viewHandler.productState.setRoomListExpanded(false);
    },
    onTouchStart: function onTouchStart() {
      if (viewHandler.productState.roomListExpanded) viewHandler.productState.setRoomListExpanded(false);
    },
    children: [/*#__PURE__*/jsx(PlannerMsgContainer, {}), /*#__PURE__*/jsx(Planner3DImage, {}), /*#__PURE__*/jsx(Logo, {}), viewHandler.productState.allow3DComb && /*#__PURE__*/jsx(Suspense, {
      fallback: /*#__PURE__*/jsx(Fragment, {}),
      children: /*#__PURE__*/jsx(Planner3D, {})
    }), /*#__PURE__*/jsx(Planner3DGrid, {}), (viewHandler.productState.allowRTV || viewHandler.productState.allowQRCodeAR) && /*#__PURE__*/jsx(Suspense, {
      fallback: /*#__PURE__*/jsx(Fragment, {}),
      children: /*#__PURE__*/jsx(PlannerRTV, {})
    }), allowOrbitCube && /*#__PURE__*/jsx(OrbitInteraction, {}), /*#__PURE__*/jsx(Planner2DGrid, {}), /*#__PURE__*/jsx(PlannerAIRoom, {}), viewHandler.uiState.isInMobileView && /*#__PURE__*/jsx(MobileNavIcons, {}), /*#__PURE__*/jsx(RotateInfo, {}), !viewHandler.productState.hidePlannerUiIcons && !(viewHandler.productState.doShowRTV || viewHandler.productState.doShow3DComb) && /*#__PURE__*/jsx(PlannerUIVariant, {}), viewHandler.productState.plannerMode == 'No' && /*#__PURE__*/jsx("div", {
      className: wcConfiguratorArticleImage,
      children: viewHandler.productState.articleImage && /*#__PURE__*/jsx("img", {
        src: viewHandler.productState.articleImage,
        className: center
      })
    })]
  });
};
var ProductCenter$1 = observer(ProductCenter);

export { ProductCenter$1 as default };
