import React from "react";
import { PopoverProps } from "./PopoverProps";
import { Popover as KendoPopover } from "@progress/kendo-react-tooltip";

const Popover: React.FC<PopoverProps> = ({
  dataTestId,
  children,
  anchor,
  animate,
  appendTo,
  callout,
  className,
  collision,
  contentStyle,
  id,
  margin,
  offset,
  popoverClass,
  position,
  positionMode,
  scale,
  show,
  style,
  title,
  onClose,
  onOpen,
  onPosition,
}) => (
  <div data-test-id={dataTestId}>
    <KendoPopover
      anchor={anchor}
      animate={animate}
      appendTo={appendTo}
      callout={callout}
      className={className}
      collision={collision}
      contentStyle={contentStyle}
      id={id}
      margin={margin}
      offset={offset}
      popoverClass={popoverClass}
      position={position}
      positionMode={positionMode}
      scale={scale}
      show={show}
      style={style}
      title={title}
      onClose={onClose}
      onOpen={onOpen}
      onPosition={onPosition}
    >
      {children}
    </KendoPopover>
  </div>
);

export default Popover;
