import { EventEmitter, type OnDestroy } from "@angular/core"; import { type SafeHtml } from "@angular/platform-browser"; import { type SuggestionOption } from "@magicx-eng/ai-autocomplete-vanilla"; import * as i0 from "@angular/core"; /** * Internal single-option cell used inside the suggestion grid. Mirrors * `packages/react/src/components/SuggestionItem.tsx`. Handles: * * - Tappable vs non-tappable cursor + hover styling * - Pressed-state compress animation (170ms, single-flight) * - Keyboard activation (Enter/Space) * - ARIA `role="option"` + `aria-selected` for the listbox pattern * - Loading skeleton when `loading=true` * - Server-provided icon (`icon_svg`), allowlisted through the core's * `sanitizeOptionIconSvg` before it is bound as HTML * - Server-provided picture (`image_url`) as a square thumbnail in place of * the icon, and item count (`item_count`) at the row's trailing edge * * @internal */ export declare class SuggestionItemComponent implements OnDestroy { option: SuggestionOption; isHighlighted: boolean; id: string; loading: boolean; /** Whether to draw the option's `icon_svg` before its text. Default: true. */ showIcon: boolean; /** Whether to draw the option's `image_url` as a thumbnail before its text, in place of the icon. Default: true. */ showImage: boolean; /** Whether to show the option's `item_count` at the row's trailing edge. Default: true. */ showCount: boolean; /** Fade this option's text toward its bottom edge (last visible row of a scrollable grid). */ scrollHint: boolean; /** * Start delay of this row's entrance animation (ms) — each row rises in a * beat after the one nearer the input. Captured once, on first render, so a * later change-detection pass can't restart a row mid-rise. */ set enterDelayMs(value: number); /** * The captured delay; `null` until the first `enterDelayMs` binding lands. * The template binds it to `--aia-option-enter-delay` (the core's * OPTION_ENTER_DELAY_VAR), which the stylesheet's entrance rule reads. */ enterDelay: number | null; readonly select: EventEmitter; readonly highlight: EventEmitter; /** * The pointer left this row. The owner clears the highlight if it is still * on this row: a hover highlight ends with the hover, so Enter afterwards * submits instead of picking a row the pointer is no longer on. */ readonly unhighlight: EventEmitter; pressed: boolean; private readonly cdr; private readonly sanitizer; private pressedTimer; private iconSource; private iconSafe; /** * The `src`s that failed to load: the row moves on to the next source (a * Shopify thumbnail falls back to the original), and the tile keeps its * placeholder fill once none is left. */ private failedSrcs; /** The option's text. `icon` is the icon's name and is never shown as text. */ get label(): string; /** * The picture's `src`, or `null` when the row draws none: images off, no * `image_url`, or one that is not an http(s) URL. A picture stands in for * the icon — a row never leads with two visuals. */ get imageSrc(): string | null; /** Whether every source of the picture failed to load (the tile's fill stays). */ get imageFailed(): boolean; onImageError(): void; private get imageSources(); /** * The count as printed ("1,284"), or `null` when the row shows none. The * unit word after it is the stylesheet's (`--aia-option-count-unit`). */ get countLabel(): string | null; /** * The option's icon as bindable HTML, or `null` when it has none (or its * markup failed the allowlist). Angular's own HTML sanitizer strips `` * wholesale, so the core's allowlisted output is marked trusted instead — * it is never the server's raw string. Recomputed only when the markup * changes; the getter runs on every OnPush check. */ get iconHtml(): SafeHtml | null; ngOnDestroy(): void; onSelect(): void; onMouseEnter(): void; onMouseLeave(): void; onKeyDown(event: KeyboardEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } //# sourceMappingURL=suggestion-item.component.d.ts.map