import Popover, { type PopoverProps } from '@material-hu/mui/Popover';

const CustomBasePopover = ({ children, ...other }: PopoverProps) => {
  return (
    <Popover
      elevation={8}
      anchorOrigin={{
        vertical: 'bottom',
        horizontal: 'right',
      }}
      transformOrigin={{
        vertical: 'bottom',
        horizontal: 'left',
      }}
      disableRestoreFocus
      {...other}
      slotProps={{
        paper: {
          sx: { p: 2, borderRadius: 2 },
        },
      }}
      sx={{
        pointerEvents: 'none',
        ...other.sx,
      }}
    >
      {children}
    </Popover>
  );
};

export default CustomBasePopover;
