import type { IntervalPopoverProps } from "../../interfaces.js";
import type { Popover as Popover } from "@esri/calcite-components/components/calcite-popover";

/**
 * Remove popover element
 *
 * @param popover - popover element to be removed
 * @internal
 */
export function removePopover(popover: any): null;

/**
 * Edit popover element dynamically
 *
 * @param popover - a popover element
 * @param isOpen - determine whether to open popover or not
 * @internal
 */
export function editPopover(popover: Popover | undefined, isOpen?: boolean): void;

/**
 * Check if the selected content in the popover has changed. Ignores cases going to or coming from `undefined`, as this indicates setup or teardown of the popover rather than a change in selection.
 *
 * @param newSelectedContent - new selected content
 * @param oldSelectedContent - old selected content
 * @returns true if the selected content has changed, false otherwise
 * @internal
 */
export function popoverSelectedContentHasChanged(newSelectedContent: IntervalPopoverProps | string[] | string | undefined, oldSelectedContent: IntervalPopoverProps | string[] | string | undefined): boolean;