"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _ComponentContainer = require("../../../../Framework/ComponentContainer");
var _Selectors = require("../../../Reducers/DesignArea/Selectors");
var _DesignerUI = require("../DesignerUI");
var _ServiceLocator = require("../../../ServiceLocator");
var _Selectors2 = require("../../../Reducers/Configurator/Selectors");
var mapStateToProps = function mapStateToProps(state) {
  var canvasSize = (0, _Selectors.getCurrentCanvasSize)(state);
  var show = canvasSize.width > 0 && canvasSize.height > 0;
  var selectedColor = (0, _Selectors2.getClientHighlightColor)(state);
  var enableHiding = (0, _Selectors2.visualizationModeCheck)(state).is3D();
  var hasBorder = !(0, _Selectors.designAreaAppliesMask)(state);
  return {
    Component: _DesignerUI.DefaultDesigner,
    canvasSize: canvasSize,
    show: show,
    selectedColor: selectedColor,
    hasBorder: hasBorder,
    hideDesigner: enableHiding ? _ServiceLocator.Services.designData.closeDesignAreaEditor : undefined,
    useCheckerBoardBackground: (0, _Selectors2.isFallbackVisualizationMode)(state)
  };
};
var _default = exports["default"] = (0, _ComponentContainer.containerConnect)(mapStateToProps);