import { IManagedHoverTooltipHTMLElement } from "../../base/browser/ui/hover/hover.js";
import { Disposable } from "../../base/common/lifecycle.js";
import { IActionListItemHover } from "../../platform/actionWidget/browser/actionList.js";
import type { IChatPillEntry } from "./chatPills.js";
export interface IChatPillHoverContent {
readonly element: HTMLElement;
readonly tabbableElements: readonly HTMLElement[];
/** Noninteractive regions with stable indexes that can refresh without replacing focused content. */
readonly liveElements?: readonly HTMLElement[];
readonly onRefreshing?: () => void;
}
/** Resource-specific content and freshness; the shared presenter owns the hover lifecycle. */
export interface IChatPillHoverContentProvider {
readonly fallback: string;
/** Preview panels reserve their width, including while loading; text hovers size to their content. */
readonly sizing?: "content" | "preview";
/** Creates a fresh content snapshot for an opening or refresh. */
readonly createContent: (density: "default" | "compact") => IChatPillHoverContent | undefined;
readonly resolve?: () => Promise;
readonly isFresh?: () => boolean;
readonly failedFallback?: string;
}
type CreateHover = IChatPillHoverContentProvider["createContent"];
type HoverPresentation = Pick;
export declare function createChatPillHoverElement(className: string, density?: "default" | "compact", sizing?: "content" | "preview"): HTMLElement;
/** Supplies the same hover lifecycle for static and asynchronously enriched pill content. */
export declare function createChatPillHover(provider: IChatPillHoverContentProvider): {
readonly hover: IActionListItemHover;
readonly pillHover: IManagedHoverTooltipHTMLElement;
};
/** Keeps collection hovers and actions stable through updates, with fresh content on reopening. */
export declare class ChatPillHoverCache extends Disposable {
private readonly _entries;
private _scope;
get(key: string, entry: IChatPillEntry, createHover: CreateHover | undefined, sizing?: IChatPillHoverContentProvider["sizing"]): HoverPresentation;
retain(keys: ReadonlySet, scope?: string): void;
dispose(): void;
}
export {};