import _extends from "@babel/runtime/helpers/esm/extends";
import _taggedTemplateLiteralLoose from "@babel/runtime/helpers/esm/taggedTemplateLiteralLoose";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";

function _templateObject2() {
  var data = _taggedTemplateLiteralLoose(["caret"]);

  _templateObject2 = function _templateObject2() {
    return data;
  };

  return data;
}

function _templateObject() {
  var data = _taggedTemplateLiteralLoose(["title"]);

  _templateObject = function _templateObject() {
    return data;
  };

  return data;
}

import React from 'react';
import PropTypes from 'prop-types';
import { useClassNames } from '../utils';
import ArrowDown from '@rsuite/icons/legacy/ArrowDown';
var defaultProps = {
  as: 'div',
  classPrefix: 'dropdown-menu-group'
};
var DropdownMenuGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
  var Component = props.as,
      classPrefix = props.classPrefix,
      children = props.children,
      className = props.className,
      rest = _objectWithoutPropertiesLoose(props, ["as", "classPrefix", "children", "className"]);

  var _useClassNames = useClassNames(classPrefix),
      withClassPrefix = _useClassNames.withClassPrefix,
      prefix = _useClassNames.prefix,
      merge = _useClassNames.merge;

  var classes = merge(className, withClassPrefix());
  return /*#__PURE__*/React.createElement(Component, _extends({
    role: "group"
  }, rest, {
    ref: ref,
    className: classes
  }), /*#__PURE__*/React.createElement("div", {
    className: prefix(_templateObject()),
    tabIndex: -1
  }, /*#__PURE__*/React.createElement("span", null, children), /*#__PURE__*/React.createElement(ArrowDown, {
    "aria-hidden": true,
    className: prefix(_templateObject2())
  })));
});
DropdownMenuGroup.displayName = 'DropdownMenuGroup';
DropdownMenuGroup.defaultProps = defaultProps;
DropdownMenuGroup.propTypes = {
  classPrefix: PropTypes.string,
  className: PropTypes.string,
  children: PropTypes.node
};
export default DropdownMenuGroup;