import { jsx } from "react/jsx-runtime";
import Popover from "@mui/material/Popover";
import apollo_core from "@uipath/apollo-core";
const ApPopover = (props)=>{
    const { anchorOrigin = {
        vertical: 'bottom',
        horizontal: 'left'
    }, transformOrigin = {
        vertical: 'top',
        horizontal: 'left'
    }, anchorReference, anchorPosition, sx, children, open, anchorEl, onClose, ...rest } = props;
    return /*#__PURE__*/ jsx(Popover, {
        open: open,
        onClose: onClose,
        anchorEl: anchorEl,
        sx: {
            '& .MuiPaper-root': {
                borderRadius: apollo_core.Border.BorderRadiusS,
                background: 'var(--color-background)',
                boxShadow: apollo_core.Shadow.ShadowDp6
            },
            ...sx
        },
        anchorOrigin: anchorOrigin,
        transformOrigin: transformOrigin,
        anchorReference: anchorReference ?? (anchorPosition && !anchorEl ? 'anchorPosition' : 'anchorEl'),
        anchorPosition: anchorPosition,
        ...rest,
        children: children
    });
};
ApPopover.displayName = 'ApPopover';
export { ApPopover };
