"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _ComponentContainer = _interopRequireDefault(require("../../../../../Framework/ComponentContainer"));
var _Actions = require("../../../../Reducers/UI/Actions");
var _Actions2 = require("../../../../Reducers/Configurator/Actions");
var _get = _interopRequireDefault(require("lodash/get"));
var _Optiondetail = _interopRequireDefault(require("../../Components/Optiondetail"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var mapStateToProps = function mapStateToProps(_ref) {
  var ui = _ref.ui,
    configurator = _ref.configurator,
    device = _ref.device;
  return {
    Component: _Optiondetail["default"],
    show: !ui.visibilityMap.incompatibility && !!ui.visibilityMap.optionDetails,
    title: (0, _get["default"])(configurator.selectedoptionclassification, 'title', ''),
    optionclassification: configurator.selectedoptionclassification || {},
    details: configurator.optiondetails,
    options: configurator.optionsWithDetails,
    channelSettings: (0, _get["default"])(configurator.configuration, 'information.channelSettings'),
    languageSettings: (0, _get["default"])(configurator.configuration, 'information.languageSettings'),
    isTabletDevice: device.screen.isTabletDevice
  };
};
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
  return {
    onClose: function onClose() {
      dispatch((0, _Actions.setVisible)('optionDetails', false));
      dispatch((0, _Actions2.clearOptionDetails)());
    }
  };
};
var _default = exports["default"] = (0, _ComponentContainer["default"])(mapStateToProps, mapDispatchToProps);