/*
Copyright (c) 2018 Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { StatefulPopover } from '../popover/index.js';
export default function MaybeChildMenu(props) {
  if (!props.getChildMenu) {
    return props.children;
  }

  return React.createElement(StatefulPopover, {
    content: props.getChildMenu(props.item),
    ignoreBoundary: true,
    onMouseEnterDelay: 100,
    onMouseLeaveDelay: 100,
    placement: "rightTop",
    triggerType: "hover"
  }, props.children);
}