import {
  PopoverCloseEvent,
  PopoverPositionEvent,
} from "@progress/kendo-react-tooltip";

export interface PopoverAnimation {
  closeDuration?: number;
  openDuration?: number;
}

type PopoverPosition = "top" | "left" | "bottom" | "right";

export interface PopoverProps {
  dataTestId?: string;
  children?: React.ReactNode;
  anchor?: null | HTMLElement;
  animate?: boolean | PopoverAnimation;
  appendTo?: null | HTMLElement;
  callout?: boolean;
  className?: string | string[];
  collision?: {
    horizontal: "fit" | "flip" | "none";
    vertical: "fit" | "flip" | "none";
  };
  contentStyle?: React.CSSProperties;
  id?: string;
  margin?: { horizontal: number; vertical: number };
  offset?: { left: number; top: number };
  popoverClass?: string | string[] | { [key: string]: boolean };
  position?: PopoverPosition;
  positionMode?: "absolute" | "fixed";
  scale?: number;
  show?: boolean;
  style?: React.CSSProperties;
  title?: React.ReactNode;
  onClose?: (event: PopoverCloseEvent) => void;
  onOpen?: (event: PopoverOpenEvent) => void;
  onPosition?: (event: PopoverPositionEvent) => void;
}

interface PopoverOpenEvent {
  target: PopoverHandle;
}

interface PopoverHandle {}
