import * as _spartan_ng_brain_command from '@spartan-ng/brain/command'; import * as _angular_core from '@angular/core'; import { InjectionToken, Type, ExistingProvider, ValueProvider, OnInit } from '@angular/core'; import { ActiveDescendantKeyManager, Highlightable } from '@angular/cdk/a11y'; import { BooleanInput } from '@angular/cdk/coercion'; import { ControlValueAccessor } from '@angular/forms'; import { ChangeFn, TouchFn } from '@spartan-ng/brain/forms'; declare class BrnCommandList { private static _id; private readonly _command; /** The id of the command list */ readonly id: _angular_core.InputSignal; /** Optional accessible name for the listbox. Usually not needed as the combobox names the widget. */ readonly ariaLabel: _angular_core.InputSignal; constructor(); static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare const BrnCommandToken: InjectionToken; declare function provideBrnCommand(command: Type): ExistingProvider; declare function injectBrnCommand(): BrnCommand; type CommandFilter = (value: string, search: string) => boolean; interface BrnCommandConfig { filter: CommandFilter; } declare function provideBrnCommandConfig(config: Partial): ValueProvider; declare function injectBrnCommandConfig(): BrnCommandConfig; declare const BRN_COMMAND_VALUE_ACCESSOR: { provide: _angular_core.InjectionToken; useExisting: _angular_core.Type; multi: boolean; }; declare class BrnCommand implements ControlValueAccessor { private static _id; private readonly _injector; private readonly _config; /** The id of the command */ readonly id: _angular_core.InputSignal; /** A custom filter function to use when searching. */ readonly filter: _angular_core.InputSignal; /** Whether the command is disabled */ readonly disabled: _angular_core.InputSignalWithTransform; private readonly _disabled; /** @internal The disabled state as a readonly signal */ readonly disabledState: _angular_core.Signal; /** when the selection has changed */ readonly valueChange: _angular_core.OutputEmitterRef; /** The current search query. */ readonly search: _angular_core.ModelSignal; /** @internal Access all the items within the command */ readonly items: _angular_core.Signal; /** @internal The key manager for managing active descendant */ readonly keyManager: ActiveDescendantKeyManager<_spartan_ng_brain_command.BrnCommandItem>; private readonly _commandList; /** @internal The id of the command list, registered by BrnCommandList. Used by the input for aria-controls. */ readonly listId: _angular_core.Signal; /** @internal Register the command list. Called by BrnCommandList in its constructor. */ registerCommandList(list: BrnCommandList): void; protected _onChange?: ChangeFn; protected _onTouched?: TouchFn; constructor(); protected selectActiveItem(): void; /** CONTROL VALUE ACCESSOR */ writeValue(value: string | null): void; registerOnChange(fn: ChangeFn): void; registerOnTouched(fn: TouchFn): void; setDisabledState(isDisabled: boolean): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class BrnCommandEmpty { private readonly _templateRef; private readonly _viewContainerRef; private readonly _command; /** Determine if the command has any visible items */ private readonly _visible; constructor(); static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class BrnCommandGroup { private static _id; /** The id of the command list */ readonly id: _angular_core.InputSignal; /** Get the items in the group */ private readonly _items; /** Determine if there are any visible items in the group */ protected readonly _visible: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class BrnCommandInput { private static _id; private readonly _el; private readonly _command; private readonly _initialId; /** The id of the command input */ readonly id: _angular_core.InputSignalWithTransform; protected readonly _commandListId: _angular_core.Signal; protected readonly _disabled: _angular_core.Signal; /** The id of the active option */ protected readonly _activeDescendant: _angular_core.WritableSignal; constructor(); /** Listen for changes to the input value */ protected onInput(): void; /** Listen for keydown events */ protected onKeyDown(event: KeyboardEvent): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class BrnCommandItem implements Highlightable, OnInit { private static _id; private readonly _platform; private readonly _elementRef; /** Access the command component */ private readonly _command; /** A unique id for the item */ readonly id: _angular_core.InputSignal; /** The value this item represents. */ readonly value: _angular_core.InputSignal; /** Whether the item is disabled. */ readonly _disabled: _angular_core.InputSignalWithTransform; /** Expose disabled as a value - used by the Highlightable interface */ get disabled(): boolean; /** Whether the item is initialized, this is to prevent accessing the value-input before the component is initialized. * The brn-command-empty directive accesses the value before the component is initialized, which causes an error. */ private readonly _initialized; /** Whether the item is selected. */ protected readonly _active: _angular_core.WritableSignal; /** Emits when the item is selected. */ readonly selected: _angular_core.OutputEmitterRef; private _activatedByPointer; /** @internal Determine if this item is visible based on the current search query */ readonly visible: _angular_core.Signal; /** @internal Get the value of the item, with check if it has been initialized to avoid errors */ readonly safeValue: _angular_core.Signal; /** @internal Get the display value */ getLabel(): string; /** @internal */ setActiveStyles(): void; /** @internal */ setInactiveStyles(): void; protected onClick(): void; protected activate(): void; ngOnInit(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class BrnCommandSeparator { private readonly _command; /** Determine if the command has any search input */ protected readonly _hasSearchInput: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare const BrnCommandInputToken: InjectionToken; declare function provideBrnCommandInput(command: Type): ExistingProvider; declare const BrnCommandItemToken: InjectionToken; declare function provideBrnCommandItem(command: Type): ExistingProvider; declare const BrnCommandImports: readonly [typeof BrnCommand, typeof BrnCommandEmpty, typeof BrnCommandGroup, typeof BrnCommandInput, typeof BrnCommandItem, typeof BrnCommandList, typeof BrnCommandSeparator]; export { BRN_COMMAND_VALUE_ACCESSOR, BrnCommand, BrnCommandEmpty, BrnCommandGroup, BrnCommandImports, BrnCommandInput, BrnCommandInputToken, BrnCommandItem, BrnCommandItemToken, BrnCommandList, BrnCommandSeparator, BrnCommandToken, injectBrnCommand, injectBrnCommandConfig, provideBrnCommand, provideBrnCommandConfig, provideBrnCommandInput, provideBrnCommandItem }; export type { BrnCommandConfig, CommandFilter };