import * as _angular_core from '@angular/core';
import { OnInit } from '@angular/core';
import { agorapulseSymbol } from '@agorapulse/ui-symbol';
import { ListboxValueChangeEvent } from '@angular/cdk/listbox';
import { Validator, AbstractControl, ValidationErrors } from '@angular/forms';
import * as i1 from 'ngxtension/control-value-accessor';
import { NgxControlValueAccessor } from 'ngxtension/control-value-accessor';

interface FilterChipAvatar {
    profilePicture?: string;
    username?: string;
    network?: string;
}

interface FilterChipItem {
    /**
     * The source object backing the chip — primitive or domain object.
     * The form-model value is extracted via `bindValue` and the displayed text via `bindLabel`.
     */
    value: unknown;
    disabled?: boolean;
    disabledTooltip?: string;
    symbolId?: agorapulseSymbol;
    avatar?: FilterChipAvatar;
}
type FilterChipsListValue = readonly unknown[];
type FilterChipsListCompareFn = (a: unknown, b: unknown) => boolean;
/** Emitted on user-initiated selection changes (not on programmatic `writeValue`). */
interface FilterChipsListChange {
    /** New selection after the toggle — always an array (length 0 or 1 in single mode). */
    value: FilterChipsListValue;
    /** The item that was triggered. */
    item: FilterChipItem;
}
declare const AP_FILTER_CHIPS_LIST_VALIDATOR: {
    provide: _angular_core.InjectionToken<readonly (Function | Validator)[]>;
    useExisting: _angular_core.Type<any>;
    multi: boolean;
};
declare class FilterChipsListComponent implements Validator, OnInit {
    private readonly symbolRegistry;
    private readonly injector;
    /**
     * Resolved in `ngOnInit` (not as a field initializer) to avoid a circular dependency:
     * `NgModel` injects `NG_VALIDATORS` (multi) → `FilterChipsListComponent` (validator) →
     * `NgxControlValueAccessor` → `NgControl` (= the same `NgModel` being constructed).
     */
    protected cva: NgxControlValueAccessor<FilterChipsListValue>;
    /** Chips to render. Each item exposes a `value` (extracted via `bindValue`) and a label (via `bindLabel`). */
    items: _angular_core.InputSignal<FilterChipItem[]>;
    /** When true, multiple chips can be selected at once. When false, only one. */
    multiple: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** Disable every chip in the list. Combined with the FormControl disabled state. */
    disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** Mark the control as required. Surfaces `{ required: true }` on empty selection and `aria-required="true"`. */
    required: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** Key on `item.value` to project as the form-model value. When null (default), the whole `item.value` is used. */
    bindValue: _angular_core.InputSignal<string | null>;
    /** Key on `item.value` to display as the chip label. When null (default), the value itself is used when primitive. */
    bindLabel: _angular_core.InputSignal<string | null>;
    /** Equality used to match selected values against items. Defaults to `Object.is` — pass a custom fn for object values. */
    compareWith: _angular_core.InputSignal<FilterChipsListCompareFn>;
    /** Accessible label for the listbox — relayed to the inner `[role="listbox"]` element via `aria-label`. */
    ariaLabel: _angular_core.InputSignal<string | null>;
    /** User-initiated selection change — payload `{ value, item }`. Not emitted on programmatic `writeValue`. */
    valueChange: _angular_core.OutputEmitterRef<FilterChipsListChange>;
    /** Effective disabled state — `[disabled]` input OR `FormControl.disable()` (mirrored by `cva.disabled$`). */
    protected readonly isDisabled: _angular_core.Signal<boolean>;
    protected readonly viewItems: _angular_core.Signal<{
        source: FilterChipItem;
        modelValue: unknown;
        label: string;
        symbolId: string | undefined;
        avatar: FilterChipAvatar | undefined;
        disabledTooltip: string | undefined;
        disabled: boolean;
    }[]>;
    private readonly _validator;
    private _onValidatorChange;
    constructor();
    ngOnInit(): void;
    protected onListboxChange(event: ListboxValueChangeEvent<unknown>): void;
    validate(control: AbstractControl): ValidationErrors | null;
    registerOnValidatorChange(fn: () => void): void;
    private modelOf;
    private labelOf;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<FilterChipsListComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<FilterChipsListComponent, "ap-filter-chips-list", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "bindValue": { "alias": "bindValue"; "required": false; "isSignal": true; }; "bindLabel": { "alias": "bindLabel"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, [{ directive: typeof i1.NgxControlValueAccessor; inputs: {}; outputs: {}; }]>;
}

export { AP_FILTER_CHIPS_LIST_VALIDATOR, FilterChipsListComponent };
export type { FilterChipItem, FilterChipsListChange, FilterChipsListCompareFn, FilterChipsListValue };
