import { u as useViewHandler } from './index-bbdfb97a.js';
import 'react';
import { observer } from 'mobx-react-lite';
import RoomGallery from './index-be7a52a8.js';
import { useDivaCore } from '@crystaldesign/diva-core';
import { jsx, Fragment } 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 'classnames';
import 'qrcode.react';
import '@babel/runtime/helpers/typeof';
import 'flat';
import 'react-switch';
import 'react-countup';
import 'swiper/react';
import 'swiper/modules';
import './index-9c4f9dc2.js';
import './index.module-613d19d3.js';
import './index-04a7a9b4.js';
import './index-23081351.js';
import '@babel/runtime/helpers/objectDestructuringEmpty';
import './index-b14a4a7c.js';
import './index-fdf81349.js';

var AiRoomsSelection = function AiRoomsSelection(props) {
  var _viewHandler$aiState$, _organization$setting;
  var viewHandler = useViewHandler();
  var _useDivaCore = useDivaCore(),
    _useDivaCore$state = _useDivaCore.state,
    user = _useDivaCore$state.user,
    organization = _useDivaCore$state.organization;
  if (!viewHandler.aiState.showAiRoomRenderingInSummary || !viewHandler.viewPlannerHandler.isAny3DVisualization() || (!user ? !viewHandler.aiState.shouldShowAiForAnonymous : !viewHandler.aiState.isAnyLimitDefined) || !((_viewHandler$aiState$ = viewHandler.aiState.enrichedAiRoomRenderings()) !== null && _viewHandler$aiState$ !== void 0 && _viewHandler$aiState$.length) || (_organization$setting = organization.settings) !== null && _organization$setting !== void 0 && (_organization$setting = _organization$setting.aiSettings) !== null && _organization$setting !== void 0 && _organization$setting.checkForDivaKiReady && !viewHandler.aiState.catalogDataKiReady()) return /*#__PURE__*/jsx(Fragment, {});

  // Use enriched items from AI state (computed property with all callbacks and current state)
  return /*#__PURE__*/jsx(RoomGallery, {
    roomItems: viewHandler.aiState.enrichedAiRoomRenderings(true),
    selectedRoom: viewHandler.aiState.selectedRoom
  });
};
var AiRoomsSelection$1 = observer(AiRoomsSelection);

export { AiRoomsSelection$1 as default };
