"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _react = _interopRequireDefault(require("react"));

var _styles = require("@material-ui/core/styles");

var _MenuItem = _interopRequireDefault(require("@material-ui/core/MenuItem"));

var _FormControl = _interopRequireDefault(require("@material-ui/core/FormControl"));

var _InputLabel = _interopRequireDefault(require("@material-ui/core/InputLabel"));

var _Select = _interopRequireDefault(require("@material-ui/core/Select"));

var _OutlinedInput = _interopRequireDefault(require("@material-ui/core/OutlinedInput"));

var ChartType = (0, _styles.withStyles)(function () {
  return {
    chartType: {
      width: '160px'
    },
    chartTypeLabel: {
      backgroundColor: 'transparent'
    }
  };
})(function (_ref) {
  var onChange = _ref.onChange,
      value = _ref.value,
      classes = _ref.classes,
      availableChartTypes = _ref.availableChartTypes,
      chartTypeLabel = _ref.chartTypeLabel;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: classes.chartType
  }, /*#__PURE__*/_react["default"].createElement(_FormControl["default"], {
    variant: 'outlined',
    className: classes.chartType
  }, /*#__PURE__*/_react["default"].createElement(_InputLabel["default"], {
    id: "type-helper-label",
    className: classes.chartTypeLabel
  }, chartTypeLabel), /*#__PURE__*/_react["default"].createElement(_Select["default"], {
    labelId: "type-helper-label",
    value: value,
    onChange: onChange,
    input: /*#__PURE__*/_react["default"].createElement(_OutlinedInput["default"], {
      labelWidth: 75,
      name: "type"
    })
  }, (availableChartTypes === null || availableChartTypes === void 0 ? void 0 : availableChartTypes.histogram) && /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
    value: 'histogram'
  }, availableChartTypes.histogram), (availableChartTypes === null || availableChartTypes === void 0 ? void 0 : availableChartTypes.bar) && /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
    value: 'bar'
  }, availableChartTypes.bar), (availableChartTypes === null || availableChartTypes === void 0 ? void 0 : availableChartTypes.lineDot) && /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
    value: 'lineDot'
  }, availableChartTypes.lineDot), (availableChartTypes === null || availableChartTypes === void 0 ? void 0 : availableChartTypes.lineCross) && /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
    value: 'lineCross'
  }, availableChartTypes.lineCross), (availableChartTypes === null || availableChartTypes === void 0 ? void 0 : availableChartTypes.dotPlot) && /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
    value: 'dotPlot'
  }, availableChartTypes.dotPlot), (availableChartTypes === null || availableChartTypes === void 0 ? void 0 : availableChartTypes.linePlot) && /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
    value: 'linePlot'
  }, availableChartTypes.linePlot))));
});
var _default = ChartType;
exports["default"] = _default;
//# sourceMappingURL=chart-type.js.map