import * as i0 from '@angular/core';
import { InputSignal, TemplateRef, InputSignalWithTransform, OutputEmitterRef } from '@angular/core';
/**
* Position direction for tooltip placement relative to the trigger.
*/
type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
/**
* Color variant for tooltip styling.
*/
type TooltipColor = 'default' | 'primary' | 'accent' | 'warn' | 'invert';
/**
* Size variant for tooltip dimensions.
*/
type TooltipSize = 'sm' | 'md' | 'lg';
/**
* Touch gesture handling mode.
* - 'auto': Long-press to show, tap elsewhere to hide
* - 'on': Same as auto
* - 'off': Touch does not trigger tooltip
*/
type TooltipTouchGestures = 'auto' | 'on' | 'off';
/**
* Context provided to custom tooltip templates.
*/
interface TooltipTemplateContext {
/** The text content passed to comTooltip input. */
$implicit: string;
/** Function to programmatically close the tooltip from inside the template. */
hide: () => void;
}
/**
* Which side of the trigger the tooltip is positioned on.
* Used internally for arrow orientation.
*/
type TooltipSide = 'top' | 'bottom' | 'left' | 'right';
/**
* Tooltip directive — displays supplementary information on hover/focus.
*
* Applied as an attribute directive to any trigger element. The tooltip panel
* is rendered via CDK Overlay when triggered by mouse hover, keyboard focus,
* or programmatically.
*
* @tokens `--color-tooltip`, `--color-tooltip-foreground`, `--color-primary`, `--color-primary-foreground`,
* `--color-accent`, `--color-accent-foreground`, `--color-warn`, `--color-warn-foreground`,
* `--color-popover`, `--color-popover-foreground`, `--color-border`
*
* @example Simple text tooltip
* ```html
*
* ```
*
* @example Positioned
* ```html
*
* ```
*
* @example Color variants
* ```html
*
* ```
*
* @example Custom template
* ```html
*
*
*
*
* Press Ctrl+S to save
*
*
*
* ```
*
* @example Programmatic control
* ```html
*
* ```
*
* ```ts
* // Show tooltip on validation error
* if (emailInvalid) {
* this.tooltipRef.show();
* }
* ```
*/
declare class ComTooltip {
private readonly overlay;
private readonly elementRef;
private readonly viewContainerRef;
private readonly injector;
private readonly destroyRef;
private readonly renderer;
private readonly platformId;
private readonly document;
private overlayRef;
private panelInstance;
private showTimeoutId;
private hideTimeoutId;
private touchTimeoutId;
private readonly tooltipId;
/** Current active side (updated from position changes). */
private readonly activeSide;
/** Whether the tooltip is currently visible. */
private readonly isVisible;
/** Simple text content for the tooltip. Also serves as the directive selector. */
readonly comTooltip: InputSignal;
/** Custom template for rich tooltip content. Takes precedence over text when provided. */
readonly comTooltipTpl: InputSignal | null>;
/** Preferred position direction. Default: 'top'. */
readonly comTooltipPosition: InputSignal;
/** Delay in ms before showing the tooltip. Default: 200. */
readonly comTooltipShowDelay: InputSignalWithTransform;
/** Delay in ms before hiding the tooltip. Default: 100. */
readonly comTooltipHideDelay: InputSignalWithTransform;
/** Disable the tooltip entirely. Default: false. */
readonly comTooltipDisabled: InputSignalWithTransform;
/** Touch device handling. Default: 'auto'. */
readonly comTooltipTouchGestures: InputSignal;
/** Color variant. Default: 'default'. */
readonly comTooltipColor: InputSignal;
/** Size variant. Default: 'md'. */
readonly comTooltipSize: InputSignal;
/** Whether to show the arrow/caret. Default: true. */
readonly comTooltipHasArrow: InputSignalWithTransform;
/** Emitted when the tooltip becomes visible (after delay + animation). */
readonly comTooltipShown: OutputEmitterRef;
/** Emitted when the tooltip is fully hidden. */
readonly comTooltipHidden: OutputEmitterRef;
constructor();
/** Programmatically show the tooltip (ignores disabled state for error validation use cases). */
show(): void;
/** Programmatically hide the tooltip. */
hide(): void;
protected onMouseEnter(): void;
protected onMouseLeave(): void;
protected onFocusIn(): void;
protected onFocusOut(): void;
protected onEscapeKey(): void;
protected onTouchStart(_event: TouchEvent): void;
/** Called when mouse enters the tooltip panel. */
private onPanelMouseEnter;
/** Called when mouse leaves the tooltip panel. */
private onPanelMouseLeave;
private scheduleShow;
private scheduleHide;
private clearTimers;
private clearShowTimeout;
private clearHideTimeout;
private clearTouchTimeout;
private createOverlay;
private attachPanel;
private detachPanel;
private handleDetachment;
private disposeOverlay;
static ɵfac: i0.ɵɵFactoryDeclaration;
static ɵdir: i0.ɵɵDirectiveDeclaration;
}
/**
* CVA variants for the tooltip panel wrapper.
*
* @tokens `--color-tooltip`, `--color-tooltip-foreground`, `--color-primary`, `--color-primary-foreground`,
* `--color-accent`, `--color-accent-foreground`, `--color-warn`, `--color-warn-foreground`,
* `--color-popover`, `--color-popover-foreground`, `--color-border`
*/
declare const tooltipPanelVariants: (props?: {
color?: TooltipColor;
size?: TooltipSize;
}) => string;
/**
* CVA variants for the tooltip arrow element.
* The arrow points toward the trigger element.
*
* @tokens `--color-tooltip`, `--color-primary`, `--color-accent`, `--color-warn`,
* `--color-popover`, `--color-border`
*/
declare const tooltipArrowVariants: (props?: {
color?: TooltipColor;
side?: TooltipSide;
}) => string;
export { ComTooltip, tooltipArrowVariants, tooltipPanelVariants };
export type { TooltipColor, TooltipPosition, TooltipSize, TooltipTemplateContext, TooltipTouchGestures };