'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
var React = require('react');
var plasmaNewHope = require('@salutejs/plasma-new-hope');
var DropdownOld_config = require('./DropdownOld.config.js');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var React__default = /*#__PURE__*/_interopDefault(React);

var _excluded = ["trigger", "children", "opened", "isOpen", "disclosure", "onToggle", "placement", "offsetTop"];
var mergedConfig = /*#__PURE__*/plasmaNewHope.mergeConfig(plasmaNewHope.dropdownOldConfig, DropdownOld_config.config);
var DropdownNewHope = /*#__PURE__*/plasmaNewHope.component(mergedConfig);
var DropdownPopup = /*#__PURE__*/React.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 = _rollupPluginBabelHelpers.objectWithoutProperties(props, _excluded);
  var offsetAtTop = typeof offsetTop === 'number' ? offsetTop : 0;
  return /*#__PURE__*/React__default.default.createElement(DropdownNewHope, _rollupPluginBabelHelpers.extends({}, rest, {
    ref: ref,
    onToggle: onToggle,
    target: disclosure,
    opened: opened,
    isOpen: isOpen,
    trigger: trigger,
    placement: placement,
    offset: [offsetAtTop, 0]
  }), children);
});

exports.DropdownPopup = DropdownPopup;
//# sourceMappingURL=DropdownPopup.js.map
