"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _FullScreenView = _interopRequireDefault(require("../Components/FullScreenView"));
var _ComponentContainer = require("../../../../Framework/ComponentContainer");
var _ServiceLocator = require("../../../ServiceLocator");
var _Selectors = require("../../../Reducers/DesignView/Selectors");
var _Selectors2 = require("../../../Reducers/DesignArea/Selectors");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var mapStateToProps = function mapStateToProps(state) {
  return {
    Component: _FullScreenView["default"],
    handleOpenPreview: function handleOpenPreview() {
      _ServiceLocator.Services.designData.toggleIsInPreviewMode(true);
      _ServiceLocator.Services.designData.clearDesignAreaSelection();
      _ServiceLocator.Services.visualization.enableDesignAreaInteraction(false);
    },
    thumbnailDotMode: state.designView.designViews.filter(function (designView) {
      return !designView.thumbnails;
    }).length > 0,
    handleClosePreview: function handleClosePreview() {
      _ServiceLocator.Services.designData.toggleIsInPreviewMode(false);
      _ServiceLocator.Services.visualization.initDesignAreaInteraction();
    },
    showDesignViewList: (0, _Selectors.getDesignViewLength)(state) > 1 && !(0, _Selectors2.isAnyDesignAreaSelected)(state),
    hasItems: (0, _Selectors.getDesignViewLength)(state) > 0,
    hasMoreItems: (0, _Selectors.getDesignViewLength)(state) > 1,
    areAllDesignAreasEmpty: (0, _Selectors2.areAllDesignAreasEmpty)(state.configurator)
  };
};
var _default = exports["default"] = (0, _ComponentContainer.containerConnect)(mapStateToProps);