"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _get = _interopRequireDefault(require("lodash/get"));
var _Thumbnail = _interopRequireDefault(require("../Components/Thumbnail"));
var _ComponentContainer = require("../../../../Framework/ComponentContainer");
var _ServiceLocator = require("../../../ServiceLocator");
var _Selectors = require("../../../Reducers/DesignView/Selectors");
var _Selectors2 = require("../../../Reducers/Configurator/Selectors");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var mapStateToProps = function mapStateToProps(state) {
  return {
    Component: _Thumbnail["default"],
    selectedVariantIdentifier: (0, _Selectors2.getSelectedVariantIdentifier)(state.configurator),
    thumbnails: (0, _Selectors.getThumbnailData)(state),
    selectedDesignViewIdentifier: (0, _get["default"])(state.designView.selectedDesignView, 'identifier')
  };
};
var mapDispatchToProps = function mapDispatchToProps() {
  return {
    onThumbnailClick: function onThumbnailClick(identifier) {
      return _ServiceLocator.Services.designData.selectDesignView(identifier);
    }
  };
};
var _default = exports["default"] = (0, _ComponentContainer.containerConnect)(mapStateToProps, mapDispatchToProps);