import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
import React, { forwardRef } from 'react';
import { component, mergeConfig, dropdownOldConfig } from '@salutejs/plasma-new-hope';
import { config } from './DropdownOld.config.js';

var _excluded = ["trigger", "children", "opened", "isOpen", "disclosure", "onToggle", "placement", "offsetTop"];
var mergedConfig = /*#__PURE__*/mergeConfig(dropdownOldConfig, config);
var DropdownNewHope = /*#__PURE__*/component(mergedConfig);
var DropdownPopup = /*#__PURE__*/forwardRef(function (props, ref) {
  var trigger = props.trigger,
    children = props.children,
    opened = props.opened,
    isOpen = props.isOpen,
    disclosure = props.disclosure,
    onToggle = props.onToggle,
    placement = props.placement,
    offsetTop = props.offsetTop,
    rest = _objectWithoutProperties(props, _excluded);
  var offsetAtTop = typeof offsetTop === 'number' ? offsetTop : 0;
  return /*#__PURE__*/React.createElement(DropdownNewHope, _extends({}, rest, {
    ref: ref,
    onToggle: onToggle,
    target: disclosure,
    opened: opened,
    isOpen: isOpen,
    trigger: trigger,
    placement: placement,
    offset: [offsetAtTop, 0]
  }), children);
});

export { DropdownPopup };
//# sourceMappingURL=DropdownPopup.js.map
