"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 _get = _interopRequireDefault(require("lodash/get"));
var _ServiceLocator = require("../../../../ServiceLocator");
var _FastConfiguration = _interopRequireDefault(require("../../Components/FastConfiguration"));
var _FastConfigurationRow = _interopRequireDefault(require("../../Components/FastConfigurationRow"));
var _FastConfigurationSelect = _interopRequireDefault(require("../../Components/FastConfigurationSelect"));
var _Price = _interopRequireDefault(require("../../Components/Price"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var mapStateToProps = function mapStateToProps(_ref) {
  var ui = _ref.ui,
    api = _ref.api,
    configurator = _ref.configurator;
  return {
    Component: _FastConfiguration["default"],
    PriceComponent: _Price["default"],
    FastConfigurationRow: _FastConfigurationRow["default"],
    FastConfigurationSelect: _FastConfigurationSelect["default"],
    show: !!ui.visibilityMap.fastConfiguration,
    options: configurator.options,
    optionclassifications: configurator.configuration.optionclassifications,
    calculation: configurator.calculation,
    isLoading: api.isFetching,
    channelSettings: (0, _get["default"])(configurator.configuration, 'information.channelSettings'),
    languageSettings: (0, _get["default"])(configurator.configuration, 'information.languageSettings'),
    configuration: configurator.configuration
  };
};
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
  return {
    onClose: function onClose() {
      return dispatch((0, _Actions.setVisible)('fastConfiguration', false));
    },
    onDoneClick: function onDoneClick() {
      return dispatch((0, _Actions.setVisible)('fastConfiguration', false));
    },
    onChannelSelect: function onChannelSelect(channel) {
      return _ServiceLocator.Services.interaction.setChannel(channel);
    }
  };
};
var _default = exports["default"] = (0, _ComponentContainer["default"])(mapStateToProps, mapDispatchToProps);