import useLazyMount from './useLazyMount';
const LazyMount = function LazyMount(props) {
  const {
    as: Tag = 'div',
    lazy = false,
    minHeight,
    children,
    intersectionOptions = {},
    ...restProps
  } = props;
  const {
    ref,
    styles,
    content
  } = useLazyMount({
    lazy,
    minHeight,
    children,
    ...intersectionOptions
  });
  return <Tag ref={ref} style={styles} {...restProps}>
      {content}
    </Tag>;
};
export default LazyMount;