import { ChangeDetectorRef, EventEmitter, ElementRef } from '@angular/core'; import { CanDisable } from '@dynatrace/ngx-groundhog/core'; /** Event object emitted by GhOption when selected or deselected. */ export interface GhOptionSelectionChange { /** Reference to the option that emitted the event. */ source: GhOption; /** Whether the change in the option's value was a result of a user action. */ isUserInput: boolean; } export declare class GhOptionBase { constructor(); } export declare const _GhOptionMixinBase: (new (...args: any[]) => CanDisable) & typeof GhOptionBase; export declare class GhOption extends _GhOptionMixinBase implements CanDisable { private _changeDetectorRef; private _elementRef; private _active; private _selected; private _id; readonly selected: boolean; /** The displayed value of the option. */ readonly viewValue: string; /** The unique ID of the option. */ readonly id: string; /** * Whether or not the option is currently active and ready to be selected. * An active option displays styles as if it is focused, but the * focus is actually retained somewhere else. This comes in handy * for components like autocomplete where focus must remain on the input. */ readonly active: boolean; /** The form value of the option. */ value: any; /** Event emitted when the option is selected or deselected. */ readonly onSelectionChange: EventEmitter; constructor(_changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef); /** Selects the option. */ select(): void; /** Deselects the option. */ deselect(): void; /** Sets focus onto this option. */ focus(): void; /** * This method sets display styles on the option to make it appear * active. This is used by the ActiveDescendantKeyManager so key * events will display the proper options as active on arrow key events. */ setActiveStyles(): void; /** * This method removes display styles on the option that made it appear * active. This is used by the ActiveDescendantKeyManager so key * events will display the proper options as active on arrow key events. */ setInactiveStyles(): void; /** Gets the label to be used when determining whether the option should be focused. */ getLabel(): string; /** * Selects the option while indicating the selection came from the user. Used to * determine if the select's view -> model callback should be invoked. */ _toggleViaInteraction(): void; /** Ensures the option is selected when activated from the keyboard. */ _handleKeydown(event: KeyboardEvent): void; /** Returns the correct tabindex for the option depending on disabled state. */ _getTabIndex(): string; /** Emits the selection change event. */ private _emitSelectionChangeEvent(isUserInput?); }