import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
import React__default, { forwardRef } from 'react';
import { base } from './variations/_view/base.js';
import { base as base$1 } from './variations/_size/base.js';
import { StyledDropdownHeader } from './DropdownHeader.styles.js';
import { safeUseId } from '../../../../utils/react.js';

var _excluded = ["id", "className", "view", "size", "children"];
/**
 * Элемент выпадающего списка
 */
var dropdownHeaderRoot = function dropdownHeaderRoot(Root) {
  return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
    var id = _ref.id,
      className = _ref.className,
      view = _ref.view,
      size = _ref.size,
      children = _ref.children,
      rest = _objectWithoutProperties(_ref, _excluded);
    var uniqId = safeUseId();
    var innerId = id || uniqId;
    return /*#__PURE__*/React__default.createElement(Root, {
      id: innerId,
      ref: outerRootRef,
      view: view,
      size: size
    }, /*#__PURE__*/React__default.createElement(StyledDropdownHeader, _extends({
      className: className
    }, rest), children));
  });
};
var dropdownHeaderConfig = {
  name: 'DropdownHeader',
  tag: 'div',
  layout: dropdownHeaderRoot,
  base: '',
  variations: {
    view: {
      css: base
    },
    size: {
      css: base$1
    }
  },
  defaults: {
    view: 'primary',
    size: 'm'
  }
};

export { dropdownHeaderConfig, dropdownHeaderRoot };
//# sourceMappingURL=DropdownHeader.js.map
