"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _DialogSelect = _interopRequireDefault(require("../../../../../Framework/Components/DialogSelect"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var OptionGroup = function OptionGroup(_ref) {
  var adjustWidth = _ref.adjustWidth,
    dialogPositioning = _ref.dialogPositioning,
    isSelected = _ref.isSelected,
    itemGroup = _ref.itemGroup,
    onOptionSelect = _ref.onOptionSelect,
    onToggle = _ref.onToggle,
    option = _ref.option,
    renderOption = _ref.renderOption,
    relativeTo = _ref.relativeTo,
    selected = _ref.selected;
  return /*#__PURE__*/_react["default"].createElement(_DialogSelect["default"], {
    onChange: onOptionSelect,
    options: itemGroup.children,
    value: selected ? option : undefined,
    label: itemGroup.title,
    valueProperty: "identifier",
    relativeTo: relativeTo,
    dialogPositioning: dialogPositioning,
    adjustWidth: adjustWidth,
    isSelected: isSelected,
    renderOption: renderOption,
    onToggle: onToggle
  });
};
OptionGroup.defaultProps = {
  adjustWidth: false,
  itemGroup: {},
  onToggle: function onToggle() {},
  selected: false
};
var _default = exports["default"] = OptionGroup;