"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.styles = exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _clsx = _interopRequireDefault(require("clsx"));
var _styles = require("@material-ui/core/styles");
var _Grid = _interopRequireDefault(require("@material-ui/core/Grid"));
var _Switch = _interopRequireDefault(require("@material-ui/core/Switch"));
var _FormControl = _interopRequireDefault(require("@material-ui/core/FormControl"));
var _Select = _interopRequireDefault(require("@material-ui/core/Select"));
var _FormControlLabel = _interopRequireDefault(require("@material-ui/core/FormControlLabel"));
var _MenuItem = _interopRequireDefault(require("@material-ui/core/MenuItem"));
var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
var _ExpansionPanel = _interopRequireDefault(require("@material-ui/core/ExpansionPanel"));
var _ExpansionPanelSummary = _interopRequireDefault(require("@material-ui/core/ExpansionPanelSummary"));
var _ExpandMore = _interopRequireDefault(require("@material-ui/icons/ExpandMore"));
var _ExpansionPanelDetails = _interopRequireDefault(require("@material-ui/core/ExpansionPanelDetails"));
var _Divider = _interopRequireDefault(require("@material-ui/core/Divider"));
var _colors = require("@material-ui/core/colors");
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
var _Card = _interopRequireDefault(require("@material-ui/core/Card"));
var _CardContent = _interopRequireDefault(require("@material-ui/core/CardContent"));
var _i18n = require("../../../../../Framework/i18n");
var _AmountInput = _interopRequireDefault(require("../../../../Shared/Components/AmountInput"));
var _MainButton = _interopRequireDefault(require("../../../../../Shared/Components/MainButton"));
var _AnalyticsWrapper = _interopRequireDefault(require("../../../../Shared/Components/Analytics/AnalyticsWrapper"));
var _InformationTag = _interopRequireDefault(require("../../../../Shared/Components/InformationTag/InformationTag"));
var _TextField = _interopRequireDefault(require("@material-ui/core/TextField"));
var _Input = _interopRequireDefault(require("@material-ui/core/Input"));
var _Checkbox = _interopRequireDefault(require("@material-ui/core/Checkbox"));
var _combineMediaQueries = require("../../../../../Utils/Styles/combineMediaQueries");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
var styles = exports.styles = function styles(theme) {
  var orientation = _objectSpread({
    portrait: ''
  }, theme.orientation);
  return {
    Card: {
      borderTop: '7px solid ' + theme.palette.primary.main
    },
    Container: {
      border: '1px solid',
      borderColor: ''
    },
    ContainerItem: {
      paddingTop: '5px'
    },
    SelectItems: {
      border: '1px solid'
    },
    DesignAreaContainer: {
      background: _colors.grey[300],
      height: '50%',
      borderColor: _colors.grey[400],
      borderTop: '1px solid',
      borderBottom: '1px solid',
      padding: '15px'
    },
    AmountContainer: {
      marginTop: '15px',
      display: 'flex',
      justifyContent: 'center'
    },
    DividerAmount: {
      marginTop: '15px',
      marginLeft: '20px',
      marginRight: '20px'
    },
    CalculationWidgetBtn: {
      fontWeight: 'bold',
      marginLeft: '25px',
      textTransform: 'none'
    },
    ExpansionPanel: {
      borderColor: _colors.grey[450],
      border: '1px solid',
      width: '100%',
      minWidth: 150
    },
    gridItemExpansionPanel: _defineProperty({
      height: 40
    }, (0, _combineMediaQueries.combineMediaQueriesWithAnd)(orientation.portrait, '@media (max-width: 345px)'), {
      '& label': {
        marginRight: 0
      }
    }),
    footerButton: _defineProperty({}, (0, _combineMediaQueries.combineMediaQueriesWithAnd)(orientation.portrait, '@media (max-width: 360px)'), {
      width: '100%',
      margin: '0px 0px 10px',
      padding: '0 24px',
      '& button': {
        width: '100%',
        marginLeft: 0
      }
    }),
    footerButtonsContainer: {
      width: '100%',
      display: 'flex',
      alignItems: 'center',
      justifyContent: 'space-between'
    },
    ExpansionPanelSummary: {
      margin: 0,
      height: 44
    },
    ExpansionPanelSummaryRoot: {
      minHeight: 44,
      paddingLeft: 12,
      paddingRight: 12
    },
    ExpansionPanelSummaryExpanded: {
      margin: '0 !important',
      minHeight: '44px !important'
    },
    ExpansionDetailsRoot: _defineProperty({
      padding: '0px 24px 2px'
    }, (0, _combineMediaQueries.combineMediaQueriesWithAnd)(orientation.portrait, '@media (max-width: 325px)'), {
      padding: '0px 10px 2px'
    }),
    Typography: {
      fontWeight: 'bold',
      paddingLeft: '16px',
      height: '50px',
      paddingTop: '16px'
    },
    CardContentRoot: {
      padding: '0'
    },
    PriceListContainer: {
      padding: '25px'
    },
    colorSwitchBase: {
      color: _colors.grey[100],
      '&$colorChecked': {
        color: _colors.grey[900],
        '& + $colorBar': {
          backgroundColor: _colors.grey[500]
        }
      }
    },
    colorBar: {},
    colorChecked: {},
    SelectLabel: {
      top: '25px',
      left: '5px'
    },
    technicalContainer: {
      minHeight: 220
    },
    SaveConfigButton: {
      textTransform: 'none',
      whiteSpace: 'nowrap',
      margin: 0,
      padding: '6px 15px'
    },
    alignInfoButton: {
      display: 'flex',
      alignItems: 'center'
    },
    gridItemWrapper: {
      padding: '10px 10px 0px',
      overflow: 'hidden',
      flexGrow: 1,
      '& input': {
        textOverflow: 'ellipsis'
      }
    },
    gridItemAlignment: {
      textAlign: 'end',
      paddingRight: '24px'
    },
    formControl: {
      width: '100%',
      marginBottom: 8
    },
    underlineInputText: {
      marginBottom: 8,
      //https://github.com/mui-org/material-ui/issues/12192#issuecomment-406182809
      '&&&&:hover:before': {
        borderBottom: '1px solid rgba(0, 0, 0, 0.42)'
      },
      '&:after': {
        borderBottom: '1px solid transparent'
      }
    },
    outlinedInput: {
      cursor: 'default'
    },
    underlineMenuItem: {
      '&:after': {
        borderBottom: '2px solid ' + theme.palette.primary.main
      }
    },
    imageControlCheckbox: {
      padding: 15
    }
  };
};
var CalculationWidget = /*#__PURE__*/function (_React$Component) {
  _inherits(CalculationWidget, _React$Component);
  var _super = _createSuper(CalculationWidget);
  function CalculationWidget() {
    var _this;
    _classCallCheck(this, CalculationWidget);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "state", {
      expanded: null,
      addImages: false
    });
    _defineProperty(_assertThisInitialized(_this), "handleDesignAreaToggle", function (designAreaIdentifier) {
      return function (_ref) {
        var checked = _ref.target.checked;
        var _this$props = _this.props,
          toggleDesignArea = _this$props.toggleDesignArea,
          addPlaceholderImage = _this$props.addPlaceholderImage;
        toggleDesignArea && toggleDesignArea(designAreaIdentifier, checked);
        if (_this.state.expanded !== designAreaIdentifier) {
          _this.setState({
            expanded: designAreaIdentifier
          });
        }
        if (_this.state.addImages) {
          addPlaceholderImage && addPlaceholderImage(checked, [designAreaIdentifier]);
        }
      };
    });
    _defineProperty(_assertThisInitialized(_this), "handleAddingPlaceHolderImage", function () {
      return function (_ref2) {
        var checked = _ref2.target.checked;
        var addPlaceholderImage = _this.props.addPlaceholderImage;
        addPlaceholderImage && addPlaceholderImage(checked);
        _this.setState({
          addImages: checked
        });
      };
    });
    _defineProperty(_assertThisInitialized(_this), "onChangeDesignProductionMethod", function () {
      return function (_ref3) {
        var value = _ref3.target.value;
        var handleChangeDesignProductionMethod = _this.props.handleChangeDesignProductionMethod;
        handleChangeDesignProductionMethod && handleChangeDesignProductionMethod(value);
      };
    });
    _defineProperty(_assertThisInitialized(_this), "onChangeSelectedColorAmount", function (designAreaIdentifier) {
      return function (_ref4) {
        var value = _ref4.target.value;
        var handleChangeSelectedColorAmount = _this.props.handleChangeSelectedColorAmount;
        handleChangeSelectedColorAmount && handleChangeSelectedColorAmount(designAreaIdentifier, value);
      };
    });
    _defineProperty(_assertThisInitialized(_this), "handlePanelChange", function (panel) {
      return function (event, expanded) {
        _this.setState({
          expanded: expanded ? panel : false
        });
        var handleChangeDesignArea = _this.props.handleChangeDesignArea;
        handleChangeDesignArea && handleChangeDesignArea(panel);
      };
    });
    _defineProperty(_assertThisInitialized(_this), "preventPanelSwitch", function (evt) {
      return evt.stopPropagation();
    });
    _defineProperty(_assertThisInitialized(_this), "renderDesignProductionMethodSelect", function () {
      var _this$props2 = _this.props,
        currentDesignProductionMethod = _this$props2.currentDesignProductionMethod,
        designProductionMethods = _this$props2.designProductionMethods,
        classes = _this$props2.classes;
      return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
        item: true,
        className: (0, _i18n.translationExists)('designProductionInformation') ? ' ' + classes.alignInfoButton : '',
        classes: {
          root: classes.gridItemWrapper
        }
      }, /*#__PURE__*/_react["default"].createElement(_FormControl["default"], {
        className: classes.formControl
      }, /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
        targetId: "widget_change_design_production_method",
        data: currentDesignProductionMethod.identifier || ''
      }, /*#__PURE__*/_react["default"].createElement(_Select["default"], {
        value: currentDesignProductionMethod.identifier || '',
        onChange: _this.onChangeDesignProductionMethod(currentDesignProductionMethod),
        input: /*#__PURE__*/_react["default"].createElement(_Input["default"], {
          classes: {
            underline: classes.underlineMenuItem
          }
        })
      }, designProductionMethods.map(function (designProductionMethod) {
        return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
          key: designProductionMethod.identifier,
          value: designProductionMethod.identifier
        }, designProductionMethod.name);
      })))), (0, _i18n.translationExists)('designProductionInformation') && /*#__PURE__*/_react["default"].createElement(_InformationTag["default"], {
        infoText: (0, _i18n.t)('designProductionInformation')
      }));
    });
    _defineProperty(_assertThisInitialized(_this), "renderDesignProductionMethodValue", function () {
      var _this$props3 = _this.props,
        designProductionMethods = _this$props3.designProductionMethods,
        classes = _this$props3.classes;
      return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
        item: true,
        classes: {
          root: classes.gridItemWrapper
        }
      }, designProductionMethods.map(function (designProductionMethod) {
        return /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
          key: designProductionMethod.identifier,
          readOnly: true,
          inputProps: {
            readOnly: true
          },
          fullWidth: true,
          value: designProductionMethod.title,
          InputProps: {
            classes: {
              input: classes.outlinedInput,
              underline: classes.underlineInputText
            }
          }
        });
      }));
    });
    _defineProperty(_assertThisInitialized(_this), "renderColorAmountValue", function () {
      var _this$props4 = _this.props,
        classes = _this$props4.classes,
        colorAmountList = _this$props4.colorAmountList;
      return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
        item: true,
        classes: {
          root: classes.gridItemWrapper
        }
      }, colorAmountList.map(function (color) {
        return /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
          key: color.identifier,
          readOnly: true,
          inputProps: {
            readOnly: true
          },
          fullWidth: true,
          value: color.name || 1 + ' ' + (0, _i18n.t)('designAreaControlbox.color'),
          InputProps: {
            classes: {
              input: classes.outlinedInput,
              underline: classes.underlineInputText
            }
          }
        });
      }));
    });
    _defineProperty(_assertThisInitialized(_this), "renderColorAmountSelect", function (designArea) {
      var _this$props5 = _this.props,
        classes = _this$props5.classes,
        colorAmounts = _this$props5.colorAmounts,
        colorAmountList = _this$props5.colorAmountList;
      return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
        item: true,
        className: (0, _i18n.translationExists)('colorAmountInformation') ? ' ' + classes.alignInfoButton : '',
        classes: {
          root: classes.gridItemWrapper
        }
      }, /*#__PURE__*/_react["default"].createElement(_FormControl["default"], {
        className: classes.formControl
      }, /*#__PURE__*/_react["default"].createElement(_Select["default"], {
        value: colorAmounts[designArea.identifier] || 1,
        onChange: _this.onChangeSelectedColorAmount(designArea.identifier),
        input: /*#__PURE__*/_react["default"].createElement(_Input["default"], {
          classes: {
            underline: classes.underlineMenuItem
          }
        })
      }, colorAmountList.map(function (colorAmount) {
        return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
          key: colorAmount.identifier,
          value: colorAmount.identifier
        }, colorAmount.name);
      }))), (0, _i18n.translationExists)('colorAmountInformation') && /*#__PURE__*/_react["default"].createElement(_InformationTag["default"], {
        infoText: (0, _i18n.t)('colorAmountInformation')
      }));
    });
    return _this;
  }
  _createClass(CalculationWidget, [{
    key: "render",
    value: function render() {
      var _this2 = this;
      var _this$props6 = this.props,
        classes = _this$props6.classes,
        designAreas = _this$props6.designAreas,
        amountValue = _this$props6.amountValue,
        amountError = _this$props6.amountError,
        onChangeAmount = _this$props6.onChangeAmount,
        priceListComponent = _this$props6.priceListComponent,
        designProductionMethods = _this$props6.designProductionMethods,
        colorAmountList = _this$props6.colorAmountList,
        onClickSaveConfiguration = _this$props6.onClickSaveConfiguration,
        onClickPrintConfiguration = _this$props6.onClickPrintConfiguration,
        loaderComponent = _this$props6.loaderComponent,
        isSaveButtonEnabled = _this$props6.isSaveButtonEnabled,
        notificationComponent = _this$props6.notificationComponent,
        activeDesignAreas = _this$props6.activeDesignAreas;
      var _this$state = this.state,
        expanded = _this$state.expanded,
        addImages = _this$state.addImages;
      return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Card["default"], {
        className: classes.Card
      }, /*#__PURE__*/_react["default"].createElement(_CardContent["default"], {
        classes: {
          root: classes.CardContentRoot
        }
      }, loaderComponent, /*#__PURE__*/_react["default"].createElement(_Grid["default"], null, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
        className: classes.Typography,
        variant: "h6"
      }, (0, _i18n.t)('calculationWidget.designCalculation'))), /*#__PURE__*/_react["default"].createElement("div", {
        className: classes.DesignAreaContainer
      }, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
        variant: "body2"
      }, (0, _i18n.t)('calculationWidget.selectDesignAreaInfo')), designAreas.map(function (designArea) {
        return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
          key: designArea.identifier,
          className: classes.ContainerItem + ((0, _i18n.translationExists)('designAreaInformation') ? ' ' + classes.alignInfoButton : '')
        }, /*#__PURE__*/_react["default"].createElement(_ExpansionPanel["default"], {
          className: classes.ExpansionPanel,
          expanded: expanded === designArea.identifier,
          onChange: _this2.handlePanelChange(designArea.identifier)
        }, /*#__PURE__*/_react["default"].createElement(_ExpansionPanelSummary["default"], {
          expandIcon: /*#__PURE__*/_react["default"].createElement(_ExpandMore["default"], null),
          classes: {
            content: classes.ExpansionPanelSummary,
            root: classes.ExpansionPanelSummaryRoot,
            expanded: classes.ExpansionPanelSummaryExpanded
          }
        }, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
          item: true,
          xs: 12,
          className: classes.gridItemExpansionPanel
        }, /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
          control: /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
            classes: {
              switchBase: classes.colorSwitchBase,
              checked: classes.colorChecked,
              track: classes.colorBar
            },
            onChange: _this2.handleDesignAreaToggle(designArea.identifier),
            onClick: _this2.preventPanelSwitch,
            checked: activeDesignAreas[designArea.identifier]
          }),
          label: designArea.name
        }))), /*#__PURE__*/_react["default"].createElement(_ExpansionPanelDetails["default"], {
          classes: {
            root: classes.ExpansionDetailsRoot
          }
        }, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
          container: true
        }, designProductionMethods.length > 1 ? _this2.renderDesignProductionMethodSelect() : _this2.renderDesignProductionMethodValue(), colorAmountList.length > 1 ? _this2.renderColorAmountSelect(designArea) : _this2.renderColorAmountValue(designArea)))), (0, _i18n.translationExists)('designAreaInformation') && /*#__PURE__*/_react["default"].createElement(_InformationTag["default"], {
          infoText: (0, _i18n.t)('designAreaInformation')
        }));
      })), /*#__PURE__*/_react["default"].createElement("div", {
        className: classes.imageControlCheckbox
      }, /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
        control: /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
          checked: addImages,
          onChange: this.handleAddingPlaceHolderImage(),
          color: "primary"
        }),
        label: (0, _i18n.t)('calculationWidget.addImage')
      })), /*#__PURE__*/_react["default"].createElement("div", {
        className: classes.AmountContainer
      }, /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
        targetId: "widget_change_amount",
        data: amountValue
      }, /*#__PURE__*/_react["default"].createElement(_AmountInput["default"], {
        onChange: onChangeAmount,
        value: amountValue,
        amountLabel: (0, _i18n.t)('calculationWidget.amount'),
        error: amountError,
        onChangeDebounceWait: 400
      }))), /*#__PURE__*/_react["default"].createElement(_Divider["default"], {
        className: classes.DividerAmount
      }), /*#__PURE__*/_react["default"].createElement("div", {
        className: classes.technicalContainer
      }, notificationComponent, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
        className: classes.PriceListContainer
      }, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
        item: true
      }, priceListComponent))), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
        container: true,
        classes: {
          root: classes.footerButtonsContainer
        }
      }, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
        item: true,
        classes: {
          root: classes.footerButton
        }
      }, /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
        targetId: "widget_print_view"
      }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
        onClick: onClickPrintConfiguration,
        className: classes.CalculationWidgetBtn,
        variant: "outlined",
        size: "large"
      }, (0, _i18n.t)('calculationWidget.printButtonText')))), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
        item: true,
        classes: {
          root: (0, _clsx["default"])(classes.gridItemAlignment, classes.footerButton)
        }
      }, /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
        targetId: "widget_open_configurator"
      }, /*#__PURE__*/_react["default"].createElement(_MainButton["default"], {
        disabled: !isSaveButtonEnabled,
        onClick: onClickSaveConfiguration,
        className: classes.SaveConfigButton,
        variant: "outlined",
        size: "large"
      }, (0, _i18n.t)('calculationWidget.openConfiguratorButtonText'))))))));
    }
  }]);
  return CalculationWidget;
}(_react["default"].Component);
_defineProperty(CalculationWidget, "defaultProps", {
  currentDesignProductionMethod: {},
  activeDesignAreas: {},
  colorAmounts: {},
  defaultDesignArea: {}
});
var _default = exports["default"] = (0, _styles.withStyles)(styles, {
  name: 'CalculationWidget'
})(CalculationWidget);