import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["open", "children", "onOpenChange"];
import React from "react";
import PropTypes from "prop-types";
import { Root } from "@radix-ui/react-popover";
import createComponent from "../../system/createComponent";
import PopoverTrigger from "./PopoverTrigger";
import PopoverContent from "./PopoverContent";
import PopoverArrow from "./PopoverArrow";
import PopoverPortal from "./PopoverPortal";
import PopoverAnchor from "./PopoverAnchor";
var Popover = /*#__PURE__*/React.forwardRef(function (props, ref) {
  var open = props.open,
      children = props.children,
      onOpenChange = props.onOpenChange,
      otherProps = _objectWithoutProperties(props, _excluded);

  return /*#__PURE__*/React.createElement(Root // @ts-ignore
  , _extends({
    ref: ref,
    open: open,
    onOpenChange: onOpenChange
  }, otherProps), children);
});
Popover.propTypes = {
  open: PropTypes.bool,
  modal: PropTypes.bool,
  onOpenChange: PropTypes.func
};
Popover.defaultProps = {
  modal: false
};

if (process.env.NODE_ENV !== "production") {
  Popover.displayName = "LabPopover";
}

var StyledPopover = createComponent(Popover); // @ts-ignore

StyledPopover.Trigger = PopoverTrigger; // @ts-ignore

StyledPopover.Content = PopoverContent; // @ts-ignore

StyledPopover.Arrow = PopoverArrow; // @ts-ignore

StyledPopover.Portal = PopoverPortal; // @ts-ignore

StyledPopover.Anchor = PopoverAnchor;
export default StyledPopover;