import * as _angular_core from '@angular/core';
import { TemplateRef, OnInit, OnChanges, SimpleChanges, ElementRef, AfterViewInit, InjectionToken } from '@angular/core';
import { OverlayRef } from '@angular/cdk/overlay';
import { ControlValueAccessor } from '@angular/forms';
import { Subject } from 'rxjs';

/**
 * @deprecated Default labels are plain text via interpolation. Prefer `{{ label }}` or
 * custom templates (`ng-label-tmp` / `ng-option-tmp`) for rich markup. Kept for public API
 * compatibility; always writes `textContent` (the `escape` input is ignored).
 *
 * @since 3.0.2
 */
declare class NgItemLabelDirective {
    private element;
    ngItemLabel: _angular_core.InputSignal<string>;
    /** @deprecated Ignored — labels are always written as text. */
    escape: _angular_core.InputSignal<boolean>;
    /**
     * Creates an instance of NgItemLabelDirective.
     *
     * @since 3.0.2
     */
    constructor();
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgItemLabelDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgItemLabelDirective, "[ngItemLabel]", never, { "ngItemLabel": { "alias": "ngItemLabel"; "required": false; "isSignal": true; }; "escape": { "alias": "escape"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}
/**
 * Marks a template as the custom option template for ng-select.
 *
 * @since 3.0.0
 */
declare class NgOptionTemplateDirective {
    readonly template: TemplateRef<any>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgOptionTemplateDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgOptionTemplateDirective, "[ng-option-tmp]", never, {}, {}, never, never, true, never>;
}
/**
 * Marks a template as the custom optgroup template for ng-select.
 *
 * @since 3.0.0
 */
declare class NgOptgroupTemplateDirective {
    readonly template: TemplateRef<any>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgOptgroupTemplateDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgOptgroupTemplateDirective, "[ng-optgroup-tmp]", never, {}, {}, never, never, true, never>;
}
/**
 * Marks a template as the custom label template for ng-select.
 *
 * @since 3.0.0
 */
declare class NgLabelTemplateDirective {
    readonly template: TemplateRef<any>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgLabelTemplateDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgLabelTemplateDirective, "[ng-label-tmp]", never, {}, {}, never, never, true, never>;
}
/**
 * Marks a template as the custom multi label template for ng-select.
 *
 * @since 3.0.0
 */
declare class NgMultiLabelTemplateDirective {
    readonly template: TemplateRef<any>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgMultiLabelTemplateDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgMultiLabelTemplateDirective, "[ng-multi-label-tmp]", never, {}, {}, never, never, true, never>;
}
/**
 * Marks a template as the custom header template for ng-select.
 *
 * @since 3.0.0
 */
declare class NgHeaderTemplateDirective {
    readonly template: TemplateRef<any>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgHeaderTemplateDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgHeaderTemplateDirective, "[ng-header-tmp]", never, {}, {}, never, never, true, never>;
}
/**
 * Marks a template as the custom footer template for ng-select.
 *
 * @since 3.0.0
 */
declare class NgFooterTemplateDirective {
    readonly template: TemplateRef<any>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgFooterTemplateDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgFooterTemplateDirective, "[ng-footer-tmp]", never, {}, {}, never, never, true, never>;
}
/**
 * Marks a template as the custom not found template for ng-select.
 *
 * @since 3.0.0
 */
declare class NgNotFoundTemplateDirective {
    readonly template: TemplateRef<any>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgNotFoundTemplateDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgNotFoundTemplateDirective, "[ng-notfound-tmp]", never, {}, {}, never, never, true, never>;
}
/**
 * Marks a template as the custom placeholder template for ng-select.
 *
 * @since 13.6.0
 */
declare class NgPlaceholderTemplateDirective {
    readonly template: TemplateRef<any>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgPlaceholderTemplateDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgPlaceholderTemplateDirective, "[ng-placeholder-tmp]", never, {}, {}, never, never, true, never>;
}
/**
 * Marks a template as the custom type to search template for ng-select.
 *
 * @since 3.0.0
 */
declare class NgTypeToSearchTemplateDirective {
    readonly template: TemplateRef<any>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgTypeToSearchTemplateDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgTypeToSearchTemplateDirective, "[ng-typetosearch-tmp]", never, {}, {}, never, never, true, never>;
}
/**
 * Marks a template as the custom loading text template for ng-select.
 *
 * @since 3.0.0
 */
declare class NgLoadingTextTemplateDirective {
    readonly template: TemplateRef<any>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgLoadingTextTemplateDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgLoadingTextTemplateDirective, "[ng-loadingtext-tmp]", never, {}, {}, never, never, true, never>;
}
/**
 * Marks a template as the custom tag template for ng-select.
 *
 * @since 3.0.0
 */
declare class NgTagTemplateDirective {
    readonly template: TemplateRef<any>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgTagTemplateDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgTagTemplateDirective, "[ng-tag-tmp]", never, {}, {}, never, never, true, never>;
}
/**
 * Marks a template as the custom loading spinner template for ng-select.
 *
 * @since 3.0.0
 */
declare class NgLoadingSpinnerTemplateDirective {
    readonly template: TemplateRef<any>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgLoadingSpinnerTemplateDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgLoadingSpinnerTemplateDirective, "[ng-loadingspinner-tmp]", never, {}, {}, never, never, true, never>;
}
/**
 * Marks a template as the custom clear button template for ng-select.
 *
 * @since 14.2.0
 */
declare class NgClearButtonTemplateDirective {
    readonly template: TemplateRef<any>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgClearButtonTemplateDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgClearButtonTemplateDirective, "[ng-clearbutton-tmp]", never, {}, {}, never, never, true, never>;
}

/**
 * Defines the ng option contract used by ng-select.
 *
 * @since 3.0.0
 */
interface NgOption {
    [name: string]: any;
    index?: number;
    htmlId?: string;
    selected?: boolean;
    disabled?: boolean;
    marked?: boolean;
    label?: string;
    value?: string | any;
    classes?: string;
    parent?: NgOption;
    children?: NgOption[];
}
type DropdownPosition = 'top' | 'right' | 'bottom' | 'left' | 'auto';

/**
 * Renders, positions, and virtualizes the dropdown option panel.
 *
 * @since 3.0.0
 */
declare class NgDropdownPanelComponent implements OnInit, OnChanges {
    readonly items: _angular_core.InputSignal<NgOption[]>;
    readonly showAddTag: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly markedItem: _angular_core.InputSignal<NgOption>;
    readonly position: _angular_core.InputSignal<DropdownPosition>;
    readonly bufferAmount: _angular_core.InputSignal<number>;
    readonly virtualScroll: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly headerTemplate: _angular_core.InputSignal<TemplateRef<any>>;
    readonly footerTemplate: _angular_core.InputSignal<TemplateRef<any>>;
    readonly filterValue: _angular_core.InputSignal<string>;
    readonly ariaLabelDropdown: _angular_core.InputSignal<string>;
    readonly listboxId: _angular_core.InputSignal<string>;
    /**
     * Which DOM event to listen to for outside click detection
     */
    readonly outsideClickEvent: _angular_core.InputSignal<"click" | "mousedown">;
    /** @deprecated Has no effect: the CDK overlay renders in the native Popover API top layer automatically in supporting browsers. Will be removed in a future major version. */
    readonly popover: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** Overlay hosting this panel. Used to request repositioning when the rendered content changes. */
    readonly overlayRef: _angular_core.InputSignal<OverlayRef>;
    /** Host `ng-select` element. The panel's DOM lives in the overlay, so the host cannot be derived from the DOM tree. */
    readonly selectElement: _angular_core.InputSignal<HTMLElement>;
    readonly update: _angular_core.OutputEmitterRef<any[]>;
    readonly scroll: _angular_core.OutputEmitterRef<{
        start: number;
        end: number;
    }>;
    readonly scrollToEnd: _angular_core.OutputEmitterRef<void>;
    readonly outsideClick: _angular_core.OutputEmitterRef<void>;
    private _renderer;
    private _zone;
    private _panelService;
    private _document;
    private _destroyRef;
    private _dropdown;
    private readonly contentElementRef;
    private readonly scrollElementRef;
    private readonly paddingElementRef;
    private readonly _virtualPadding;
    private readonly _scrollablePanel;
    private readonly _contentPanel;
    private _select;
    private _scrollToEndFired;
    private _updateScrollHeight;
    private _lastScrollPosition;
    private _currentPosition;
    /**
     * Gets the panel position selected by the overlay strategy.
     *
     * @returns The current position.
     *
     * @since 3.0.0
     */
    get currentPosition(): DropdownPosition;
    private _itemsLength;
    /**
     * Gets the number of rows available to the panel.
     *
     * @returns The items length.
     *
     * @since 3.0.0
     */
    private get itemsLength();
    /**
     * Updates the cached item count and resets dependent virtual-scroll state.
     *
     * @param value - The value to process.
     *
     * @since 3.0.0
     */
    private set itemsLength(value);
    /**
     * Gets the rendered range’s starting vertical offset.
     *
     * @returns The start offset.
     *
     * @since 3.0.0
     */
    private get _startOffset();
    /**
     * Initializes the instance after Angular has assigned its inputs.
     *
     * @since 3.0.0
     */
    ngOnInit(): void;
    /**
     * Responds to Angular input changes.
     *
     * @param changes - The changed Angular inputs.
     *
     * @since 3.0.0
     */
    ngOnChanges(changes: SimpleChanges): void;
    /**
     * Scrolls until the requested option is visible.
     *
     * @param option - The option to process.
     * @param startFromOption - The start from option.
     *
     * @since 3.0.0
     */
    scrollTo(option: NgOption, startFromOption?: boolean): void;
    /**
     * Scrolls to the add-tag row.
     *
     * @since 3.0.0
     */
    scrollToTag(): void;
    /**
     * Requests that the overlay strategy recalculate the panel position.
     *
     * @since 3.0.0
     */
    adjustPosition(): void;
    /**
     * Applies the position chosen by the overlay's position strategy to the panel and host
     * as `ng-select-top` / `ng-select-bottom` (and `-left` / `-right`) classes, which the
     * shipped themes use for borders, radius and spacing.
     *
     * @since 23.7.0
     */
    private _setCurrentPosition;
    /**
     * Positions the freshly rendered panel. The overlay measures the real DOM, so header and
     * footer templates and the actual item count are part of the auto placement decision
     * (#2575). Only then is the panel made visible to avoid a flash at a stale position.
     *
     * @since 23.7.0
     */
    private _positionDropdown;
    /**
     * Subscribes to CDK overlay position changes.
     *
     * @since 23.7.0
     */
    private _subscribeOverlayPosition;
    /**
     * Updates the position-specific CSS class on the panel.
     *
     * @param currentPosition - The current position.
     *
     * @since 7.4.0
     */
    private _updateDropdownClass;
    /**
     * Subscribes to panel scrolling outside Angular change detection.
     *
     * @since 3.0.0
     */
    private _handleScroll;
    /**
     * Refreshes rendered items when options or add-tag visibility changes.
     *
     * @param items - The options to process.
     * @param showAddTag - The show add tag.
     * @param firstChange - The first change.
     *
     * @since 20.6.2
     */
    private _onItemsOrShowAddTagChange;
    /**
     * Rebuilds the rendered option collection and virtual-scroll measurements.
     *
     * @param firstChange - The first change.
     *
     * @since 3.0.0
     */
    private _updateItems;
    /**
     * Recalculates the rendered virtual-scroll range.
     *
     * @param firstChange - The first change.
     *
     * @since 3.0.0
     */
    private _updateItemsRange;
    /**
     * Updates cached panelHeight from the live scrollport, preserving row-height measurements.
     *
     * @since 23.9.0
     */
    private _syncPanelHeightFromDom;
    /**
     * Updates virtual-scroll state for a new scroll position.
     *
     * @param scrollTop - The scroll top.
     *
     * @since 3.0.0
     */
    private _onContentScrolled;
    /**
     * Updates the virtual-scroll spacer height.
     *
     * @param height - The height.
     *
     * @since 3.0.0
     */
    private _updateVirtualHeight;
    /**
     * Measures and applies the virtual-scroll spacer height.
     *
     * @since 5.0.1
     */
    private _setVirtualHeight;
    /**
     * Resets virtual-scroll state after the item count changes.
     *
     * @since 3.0.0
     */
    private _onItemsLengthChanged;
    /**
     * Renders the virtual-scroll range for the current scroll position.
     *
     * @param scrollTop - The scroll top.
     *
     * @since 3.0.0
     */
    private _renderItemsRange;
    /**
     * Measures option, group, and viewport dimensions after rendering.
     *
     * @returns The measure dimensions result.
     *
     * @since 3.0.0
     */
    private _measureDimensions;
    /**
     * Reads option, group, and viewport dimensions from rendered elements.
     *
     * @param items - The options to process.
     * @param firstOption - The first option.
     * @param firstGroup - The first group.
     * @returns The read measured dimensions result.
     *
     * @since 23.9.0
     */
    private _readMeasuredDimensions;
    /**
     * Emits `scrollToEnd` once the viewport reaches the end of the content.
     *
     * @param scrollTop - The scroll top.
     *
     * @since 3.0.0
     */
    private _fireScrollToEnd;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDropdownPanelComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDropdownPanelComponent, "ng-dropdown-panel", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "showAddTag": { "alias": "showAddTag"; "required": false; "isSignal": true; }; "markedItem": { "alias": "markedItem"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "bufferAmount": { "alias": "bufferAmount"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "headerTemplate": { "alias": "headerTemplate"; "required": false; "isSignal": true; }; "footerTemplate": { "alias": "footerTemplate"; "required": false; "isSignal": true; }; "filterValue": { "alias": "filterValue"; "required": false; "isSignal": true; }; "ariaLabelDropdown": { "alias": "ariaLabelDropdown"; "required": false; "isSignal": true; }; "listboxId": { "alias": "listboxId"; "required": false; "isSignal": true; }; "outsideClickEvent": { "alias": "outsideClickEvent"; "required": false; "isSignal": true; }; "popover": { "alias": "popover"; "required": false; "isSignal": true; }; "overlayRef": { "alias": "overlayRef"; "required": false; "isSignal": true; }; "selectElement": { "alias": "selectElement"; "required": false; "isSignal": true; }; }, { "update": "update"; "scroll": "scroll"; "scrollToEnd": "scrollToEnd"; "outsideClick": "outsideClick"; }, never, ["*"], true, never>;
}

/**
 * Describes the rendered range and spacer sizes for virtual scrolling.
 *
 * @since 3.0.0
 */
interface ItemsRangeResult {
    scrollHeight: number;
    topPadding: number;
    start: number;
    end: number;
}
/**
 * Describes measured option, group, and viewport dimensions.
 *
 * @since 3.0.0
 */
interface PanelDimensions {
    /** Height of a regular option row (non-group). */
    itemHeight: number;
    /** Height of a group header row. Falls back to itemHeight when unset/equal. */
    groupHeight: number;
    panelHeight: number;
    itemsPerViewport: number;
}
/**
 * Minimal shape needed to distinguish group headers from options.
 *
 * @since 23.9.0
 */
interface VirtualScrollItem {
    children?: unknown;
}
/**
 * Calculates dropdown panel dimensions, virtual-scroll ranges, and scroll offsets.
 *
 * @since 3.0.0
 */
declare class NgDropdownPanelService {
    private _dimensions;
    /**
     * Gets the currently measured panel dimensions.
     *
     * @returns The dimensions.
     *
     * @since 3.0.0
     */
    get dimensions(): PanelDimensions;
    /**
     * Calculates the virtual-scroll item range and spacer sizes.
     *
     * @param scrollPos - The scroll pos.
     * @param itemsLength - The items length.
     * @param buffer - The buffer.
     * @param items - The options to process.
     * @returns The rendered range and spacer sizes.
     *
     * @since 3.0.0
     */
    calculateItems(scrollPos: number, itemsLength: number, buffer: number, items?: readonly VirtualScrollItem[]): ItemsRangeResult;
    /**
     * Stores the measured item, group, and panel dimensions.
     *
     * @param itemHeight - The item height.
     * @param panelHeight - The panel height.
     * @param groupHeight - The group height.
     *
     * @since 3.0.0
     */
    setDimensions(itemHeight: number, panelHeight: number, groupHeight?: number): void;
    /**
     * Returns the measured height for an option or group.
     *
     * @param item - The option to process.
     * @returns The row height in pixels.
     *
     * @since 23.9.0
     */
    getItemHeight(item: VirtualScrollItem | null | undefined): number;
    /**
     * Calculates an item’s vertical offset within the full option list.
     *
     * @param items - The options to process.
     * @param index - The index.
     * @returns The vertical offset in pixels.
     *
     * @since 23.9.0
     */
    getItemOffset(items: readonly VirtualScrollItem[], index: number): number;
    /**
     * Calculates the total virtual-scroll content height.
     *
     * @param items - The options to process.
     * @returns The total scroll height in pixels.
     *
     * @since 23.9.0
     */
    getScrollHeight(items: readonly VirtualScrollItem[]): number;
    /**
     * Calculates the scroll position needed to reveal an item.
     *
     * @param itemTop - The item top.
     * @param itemHeight - The item height.
     * @param lastScroll - The last scroll.
     *
     * @since 3.0.0
     */
    getScrollTo(itemTop: number, itemHeight: number, lastScroll: number): number;
    /**
     * Calculates a virtual-scroll range for variable-height rows.
     *
     * @param scrollPos - The scroll pos.
     * @param items - The options to process.
     * @param buffer - The buffer.
     * @returns The calculate items variable result.
     *
     * @since 23.9.0
     */
    private _calculateItemsVariable;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDropdownPanelService, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<NgDropdownPanelService>;
}

/**
 * Declares an option for ng-select declared via HTML. Use the value input to bind the option's value and the element content as its label.
 *
 * @since 3.0.0
 */
declare class NgOptionComponent implements OnInit {
    /** Value bound to the option. The projected element content is used as the option's label. */
    readonly value: _angular_core.InputSignal<any>;
    /** Whether the option is disabled and cannot be selected. */
    readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly elementRef: ElementRef<any>;
    readonly label: _angular_core.WritableSignal<string>;
    readonly classes: _angular_core.WritableSignal<string>;
    /** True when this component's inputs are initialized (after first change detection). */
    readonly isInitialized: _angular_core.WritableSignal<boolean>;
    /**
     * Creates an instance of NgOptionComponent.
     *
     * @since 3.0.0
     */
    constructor();
    /**
     * Initializes the instance after Angular has assigned its inputs.
     *
     * @since 21.5.2
     */
    ngOnInit(): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgOptionComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgOptionComponent, "ng-option", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
}

type SelectionModelFactory = () => SelectionModel;
/**
 * Creates the default selection model used by ng-select.
 *
 * @since 3.0.0
 */
declare function DefaultSelectionModelFactory(): DefaultSelectionModel;
/**
 * Defines the selection model contract used by ng-select.
 *
 * @since 3.0.0
 */
interface SelectionModel {
    value: NgOption[];
    /**
     * Selects an option according to the active selection mode.
     *
     * @param item - The option to process.
     * @param multiple - Whether multiple selection is enabled.
     * @param selectableGroupAsModel - Whether a selectable group is represented by its group value.
     *
     * @since 3.0.0
     */
    select(item: NgOption, multiple: boolean, selectableGroupAsModel: boolean): any;
    /**
     * Removes an option from the current selection.
     *
     * @param item - The option to process.
     * @param multiple - Whether multiple selection is enabled.
     *
     * @since 3.0.0
     */
    unselect(item: NgOption, multiple: boolean): any;
    /**
     * Clears the current selection.
     *
     * @param keepDisabled - Whether disabled options should remain selected.
     *
     * @since 3.0.0
     */
    clear(keepDisabled: boolean): any;
}
/**
 * Implements the default single, multiple, and grouped option selection behavior.
 *
 * @since 3.0.0
 */
declare class DefaultSelectionModel implements SelectionModel {
    private _selected;
    /**
     * Gets the currently selected options.
     *
     * @returns The value.
     *
     * @since 3.0.0
     */
    get value(): NgOption[];
    /**
     * Selects an option according to the active selection mode.
     *
     * @param item - The option to process.
     * @param multiple - Whether multiple selection is enabled.
     * @param groupAsModel - Whether a selectable group is represented by its group value.
     *
     * @since 3.0.0
     */
    select(item: NgOption, multiple: boolean, groupAsModel: boolean): void;
    /**
     * Removes an option from the current selection.
     *
     * @param item - The option to process.
     * @param multiple - Whether multiple selection is enabled.
     *
     * @since 3.0.0
     */
    unselect(item: NgOption, multiple: boolean): void;
    /**
     * Clears the current selection.
     *
     * @param keepDisabled - Whether disabled options should remain selected.
     *
     * @since 3.0.0
     */
    clear(keepDisabled: boolean): void;
    /**
     * Applies a selected state to every enabled child option.
     *
     * @param children - The children.
     * @param selected - Whether the children should be selected.
     *
     * @since 3.0.0
     */
    private _setChildrenSelectedState;
    /**
     * Removes a group’s child options from the selected collection.
     *
     * @param parent - The parent.
     *
     * @since 3.0.0
     */
    private _removeChildren;
    /**
     * Removes a group option from the selected collection.
     *
     * @param parent - The parent.
     *
     * @since 3.0.0
     */
    private _removeParent;
    /**
     * Determines whether a group contains active child options.
     *
     * @param item - The option to process.
     * @returns Whether active children.
     *
     * @since 3.7.0
     */
    private _activeChildren;
}

/**
 * Represents the class value formats accepted by ng-select and Angular's NgClass directive.
 *
 * @since 24.0.5
 */
type ClassValue = string | string[] | Set<string> | Record<string, any>;

/**
 * Manages source, filtered, grouped, marked, and selected options for an ng-select instance.
 *
 * @since 3.0.0
 */
declare class ItemsList {
    private _ngSelect;
    private _selectionModel;
    private _groups;
    /**
     * Creates an instance of ItemsList.
     *
     * @param _ngSelect - The ng select.
     * @param _selectionModel - The selection model.
     *
     * @since 3.0.0
     */
    constructor(_ngSelect: NgSelectComponent, _selectionModel: SelectionModel);
    private _items;
    /**
     * Gets the items.
     *
     * @returns The items.
     *
     * @since 3.0.0
     */
    get items(): NgOption[];
    private _filteredItems;
    /**
     * Gets the filtered items.
     *
     * @returns The filtered items.
     *
     * @since 3.0.0
     */
    get filteredItems(): NgOption[];
    private _markedIndex;
    /**
     * Gets the marked index.
     *
     * @returns The marked index.
     *
     * @since 3.0.0
     */
    get markedIndex(): number;
    /**
     * Gets the selected items.
     *
     * @returns The selected items.
     *
     * @since 3.0.0
     */
    get selectedItems(): NgOption[];
    /**
     * Gets the marked item.
     *
     * @returns The marked item.
     *
     * @since 3.0.0
     */
    get markedItem(): NgOption;
    /**
     * Determines whether every available option is already selected.
     *
     * @returns Whether no items to select.
     *
     * @since 3.0.0
     */
    get noItemsToSelect(): boolean;
    /**
     * Determines whether the configured selection limit has been reached.
     *
     * @returns Whether max items selected.
     *
     * @since 3.0.0
     */
    get maxItemsSelected(): boolean;
    /**
     * Gets the last selected item.
     *
     * @returns The last selected item.
     *
     * @since 3.0.0
     */
    get lastSelectedItem(): NgOption;
    /**
     * Maps and groups a new immutable collection of source items.
     *
     * @param items - The options to process.
     *
     * @since 3.0.0
     */
    setItems(items: readonly any[]): void;
    /**
     * Selects an option according to the active selection mode.
     *
     * @param item - The option to process.
     *
     * @since 3.0.0
     */
    select(item: NgOption): void;
    /**
     * Removes an option from the current selection.
     *
     * @param item - The option to process.
     *
     * @since 3.0.0
     */
    unselect(item: NgOption): void;
    /**
     * Finds the option matching a model value.
     *
     * @param value - The value to process.
     * @returns The matching option, when one exists.
     *
     * @since 3.0.0
     */
    findItem(value: any): NgOption;
    /**
     * Maps and appends a new option to the list.
     *
     * @param item - The option to process.
     *
     * @since 3.0.0
     */
    addItem(item: any): NgOption;
    /**
     * Clears selected options while optionally retaining disabled selections.
     *
     * @param keepDisabled - The keep disabled.
     *
     * @since 3.0.0
     */
    clearSelected(keepDisabled: boolean): void;
    /**
     * Finds an option using a case-insensitive label comparison.
     *
     * @param term - The term.
     *
     * @since 3.0.0
     */
    findByLabel(term: string): NgOption;
    /**
     * Filters the available options using the current search configuration.
     *
     * @param term - The term.
     *
     * @since 3.0.0
     */
    filter(term: string): void;
    /**
     * Restores the unfiltered option collection.
     *
     * @since 3.0.0
     */
    resetFilteredItems(): void;
    /**
     * Clears the currently marked option.
     *
     * @since 3.0.0
     */
    unmarkItem(): void;
    /**
     * Marks the next enabled option.
     *
     * @since 3.0.0
     */
    markNextItem(): void;
    /**
     * Marks the previous enabled option.
     *
     * @since 3.0.0
     */
    markPreviousItem(): void;
    /**
     * Marks a specific option for keyboard interaction.
     *
     * @param item - The option to process.
     *
     * @since 3.0.0
     */
    markItem(item: NgOption): void;
    /**
     * Marks the selected option or the configured default option.
     *
     * @param markDefault - The mark default.
     *
     * @since 3.0.0
     */
    markSelectedOrDefault(markDefault?: boolean): void;
    /**
     * Resolves a dot-separated property path from an option value.
     *
     * @param option - The option to process.
     * @param key - The key.
     * @returns The resolved nested value.
     *
     * @since 3.0.0
     */
    resolveNested(option: any, key: string): any;
    /**
     * Maps a source value to the internal option representation.
     *
     * @param item - The option to process.
     * @param index - The index.
     * @returns The mapped internal option.
     *
     * @since 3.0.0
     */
    mapItem(item: any, index: number): NgOption;
    /**
     * Remaps selected values after the source collection changes.
     *
     * @since 3.0.0
     */
    mapSelectedItems(): void;
    /**
     * Restores a selected option to the visible filtered collection.
     *
     * @param item - The option to process.
     *
     * @since 3.0.0
     */
    private _showSelected;
    /**
     * Removes a selected option from the visible filtered collection.
     *
     * @param item - The option to process.
     *
     * @since 3.0.0
     */
    private _hideSelected;
    /**
     * Matches an option using the default normalized-label search.
     *
     * @param search - The search.
     * @param opt - The opt.
     *
     * @since 3.0.0
     */
    private _defaultSearchFn;
    /**
     * Calculates the next enabled option index.
     *
     * @param steps - The steps.
     *
     * @since 3.0.0
     */
    private _getNextItemIndex;
    /**
     * Moves the marked index by the requested number of enabled options.
     *
     * @param steps - The steps.
     *
     * @since 3.0.0
     */
    private _stepToItem;
    /**
     * Returns the index that should remain marked after filtering changes.
     *
     * @since 3.0.0
     */
    private _getLastMarkedIndex;
    /**
     * Index of the first selected, non-disabled option in filtered list order.
     * Per the WAI-ARIA listbox pattern, focus lands on the first selected option when the list opens.
     *
     * @since 23.3.0
     */
    private _getFirstSelectedIndex;
    /**
     * Groups mapped options using a property name or grouping function.
     *
     * @param items - The options to process.
     * @param prop - The prop.
     * @returns The group by result.
     *
     * @since 3.0.0
     */
    private _groupBy;
    /**
     * Flattens option groups into the render order used by the dropdown.
     *
     * @param groups - The groups.
     *
     * @since 3.0.0
     */
    private _flatten;
}

/**
 * Configuration provider for the NgSelect component. You can inject this service and provide application wide configuration.
 *
 * @since 3.0.0
 */
declare class NgSelectConfig {
    /** Placeholder text. */
    placeholder: string;
    /** Set placeholder visible even when an item is selected. */
    fixedPlaceholder: boolean;
    /** Set custom text when filter returns empty result. */
    notFoundText: string;
    /** Set custom text when using Typeahead. */
    typeToSearchText: string;
    /** Set custom text when using tagging. */
    addTagText: string;
    /** Set custom text when loading items. */
    loadingText: string;
    /** Set custom text for clear all icon title. */
    clearAllText: string;
    /** Set custom text prefixed to the option label in the aria-label of the remove icon on selected values (multiple mode). */
    removeText: string;
    /** Set custom aria-label for the dropdown options list. */
    ariaLabelDropdown: string;
    /** Disable virtual scroll for the dropdown panel. */
    disableVirtualScroll: boolean;
    /** Open dropdown using enter. */
    openOnEnter: boolean;
    /** Append the dropdown overlay of every select to any element using a css selector. Painting and positioning are unaffected; the target determines DOM containment (ancestor-scoped styles, focus enclosure). */
    appendTo: string;
    /** Object property to use for selected model. By default binds to whole object. */
    bindValue: string;
    /** Object property to use for label. */
    bindLabel: string;
    /** Allows to select dropdown appearance. Set to `outline` or `fill` for Material form-field styles (applies only to Material theme). */
    appearance: string;
    /** Clears search input when item is selected. */
    clearSearchOnAdd: boolean;
    /** Deselects a selected item when it is clicked in the dropdown. */
    deselectOnClick: boolean;
    /** Control tab navigation behavior for the clear button. */
    tabFocusOnClear: boolean;
    /**
     * Controls which DOM event is used to detect outside clicks for closing the dropdown.
     * Defaults to 'click'. Set to 'mousedown' to handle early outside interactions
     * (useful when backdrops load on click and would otherwise close the dropdown).
     */
    outsideClickEvent: 'click' | 'mousedown';
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgSelectConfig, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<NgSelectConfig>;
}

/** DI token for SelectionModel implementation. You can provide custom implementation changing selection behaviour. */
declare const SELECTION_MODEL_FACTORY: InjectionToken<SelectionModelFactory>;
type AddTagFn = (term: string) => any | Promise<any>;
type CompareWithFn = (a: any, b: any) => boolean;
type GroupValueFn = (key: string | any, children: any[]) => string | any;
/**
 * Provides select, multiselect, autocomplete, keyboard, accessibility, and Signal, Reactive, and Template-driven Forms behavior.
 *
 * @since 3.0.0
 */
declare class NgSelectComponent implements OnChanges, OnInit, AfterViewInit, ControlValueAccessor {
    readonly classes: string;
    readonly config: NgSelectConfig;
    readonly _disabled: _angular_core.WritableSignal<boolean>;
    readonly _ariaLabelDropdown: _angular_core.InputSignal<string>;
    readonly ariaLabelDropdown: _angular_core.WritableSignal<string>;
    readonly _ariaLabel: _angular_core.InputSignal<string>;
    readonly ariaLabel: _angular_core.WritableSignal<string>;
    /** Marks first item as focused when opening/filtering. */
    readonly _markFirst: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly markFirst: _angular_core.WritableSignal<boolean>;
    /** Placeholder text. */
    readonly _placeholder: _angular_core.InputSignal<string>;
    readonly placeholder: _angular_core.WritableSignal<string>;
    /** Set placeholder visible even when an item is selected */
    readonly _fixedPlaceholder: _angular_core.InputSignal<boolean>;
    readonly fixedPlaceholder: _angular_core.WritableSignal<boolean>;
    /** Set custom text when filter returns empty result */
    readonly _notFoundText: _angular_core.InputSignal<string>;
    readonly notFoundText: _angular_core.WritableSignal<string>;
    /** Set custom text when using Typeahead */
    readonly _typeToSearchText: _angular_core.InputSignal<string>;
    readonly typeToSearchText: _angular_core.WritableSignal<string>;
    /** Prevent opening of ng-select on right mouse click */
    readonly _preventToggleOnRightClick: _angular_core.InputSignal<boolean>;
    readonly preventToggleOnRightClick: _angular_core.WritableSignal<boolean>;
    /** Set custom text when using tagging */
    readonly _addTagText: _angular_core.InputSignal<string>;
    readonly addTagText: _angular_core.WritableSignal<string>;
    /** Set custom text when for loading items */
    readonly _loadingText: _angular_core.InputSignal<string>;
    readonly loadingText: _angular_core.WritableSignal<string>;
    /** Set custom text for clear all icon title */
    readonly _clearAllText: _angular_core.InputSignal<string>;
    readonly clearAllText: _angular_core.WritableSignal<string>;
    /** Set custom text prefixed to the option label in the aria-label of the remove icon on selected values (multiple mode) */
    readonly _removeText: _angular_core.InputSignal<string>;
    readonly removeText: _angular_core.WritableSignal<string>;
    /** Set the dropdown position on open */
    readonly _dropdownPosition: _angular_core.InputSignal<DropdownPosition>;
    readonly dropdownPosition: _angular_core.WritableSignal<DropdownPosition>;
    /**
     * Append the dropdown overlay to any element using a css selector, resolved against the
     * select's own root (document or shadow root). The panel keeps its viewport-based
     * positioning and top-layer painting; the target controls where the overlay lives in the
     * DOM — ancestor-scoped styles, stacking context and focus containment. Defaults to the
     * document body.
     */
    readonly _appendTo: _angular_core.InputSignal<string>;
    readonly appendTo: _angular_core.WritableSignal<string>;
    /** Configure which DOM event type is used for outside click detection. Use `'mousedown'` to fix issues with backdrop/loading overlays that appear on dropdown open */
    readonly _outsideClickEvent: _angular_core.InputSignal<"click" | "mousedown">;
    readonly outsideClickEvent: _angular_core.WritableSignal<"click" | "mousedown">;
    /** You can set the loading state from the outside (e.g. async items loading) */
    readonly _loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly loading: _angular_core.WritableSignal<boolean>;
    /** Whether to close the menu when a value is selected */
    readonly _closeOnSelect: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly closeOnSelect: _angular_core.WritableSignal<boolean>;
    /** Allows to hide selected items. */
    readonly _hideSelected: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly hideSelected: _angular_core.WritableSignal<boolean>;
    /** Select marked dropdown item using tab. Default `false` */
    readonly _selectOnTab: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly selectOnTab: _angular_core.WritableSignal<boolean>;
    /** Open dropdown using enter. Default `true` */
    readonly _openOnEnter: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly openOnEnter: _angular_core.WritableSignal<boolean>;
    /** When multiple = true, allows to set a limit number of selection. */
    readonly _maxSelectedItems: _angular_core.InputSignalWithTransform<number, unknown>;
    readonly maxSelectedItems: _angular_core.WritableSignal<number>;
    /** Allow to group items by key or function expression */
    readonly _groupBy: _angular_core.InputSignal<string | ((value: any) => any)>;
    readonly groupBy: _angular_core.WritableSignal<string | ((value: any) => any)>;
    /** Function expression to provide group value */
    readonly _groupValue: _angular_core.InputSignal<GroupValueFn>;
    readonly groupValue: _angular_core.WritableSignal<GroupValueFn>;
    /** Used in virtual scrolling, the `bufferAmount` property controls the number of items preloaded in the background to ensure smoother and more seamless scrolling. */
    readonly _bufferAmount: _angular_core.InputSignalWithTransform<number, unknown>;
    readonly bufferAmount: _angular_core.WritableSignal<number>;
    /** Enable virtual scroll for better performance when rendering a lot of data */
    readonly _virtualScroll: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly virtualScroll: _angular_core.WritableSignal<boolean>;
    readonly dropdownVirtualScroll: _angular_core.Signal<boolean>;
    /** Allow to select group when groupBy is used */
    readonly _selectableGroup: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly selectableGroup: _angular_core.WritableSignal<boolean>;
    /** Control tab navigation behavior for the clear button. Default `true` */
    readonly _tabFocusOnClearButton: _angular_core.InputSignal<boolean>;
    readonly tabFocusOnClearButton: _angular_core.WritableSignal<boolean>;
    /** Indicates whether to select all children or group itself */
    readonly _selectableGroupAsModel: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly selectableGroupAsModel: _angular_core.WritableSignal<boolean>;
    /** Allow to filter by custom search function */
    readonly _searchFn: _angular_core.InputSignal<any>;
    readonly searchFn: _angular_core.WritableSignal<any>;
    /** Provide custom trackBy function */
    readonly _trackByFn: _angular_core.InputSignal<any>;
    readonly trackByFn: _angular_core.WritableSignal<any>;
    /** Clear selected values one by one when clicking backspace. Default `true` */
    readonly _clearOnBackspace: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly clearOnBackspace: _angular_core.WritableSignal<boolean>;
    /** Id to associate control with label. */
    readonly _labelForId: _angular_core.InputSignal<any>;
    readonly labelForId: _angular_core.WritableSignal<any>;
    /** Pass custom attributes to underlying `input` element */
    readonly _inputAttrs: _angular_core.InputSignal<Record<string, string>>;
    readonly inputAttrs: _angular_core.WritableSignal<Record<string, string>>;
    /** Set tabindex on ng-select */
    readonly _tabIndex: _angular_core.InputSignalWithTransform<number, unknown>;
    readonly tabIndex: _angular_core.WritableSignal<number>;
    /** Prevent user changes while preserving the current selection. */
    readonly _readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly readonly: _angular_core.WritableSignal<boolean>;
    /** Whether items should be filtered while composition started */
    readonly _searchWhileComposing: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly searchWhileComposing: _angular_core.WritableSignal<boolean>;
    /** Minimum term length to start a search. Should be used with `typeahead` */
    readonly _minTermLength: _angular_core.InputSignalWithTransform<number, unknown>;
    readonly minTermLength: _angular_core.WritableSignal<number>;
    /** Allow to edit search query if option selected. Default `false`. Works only if multiple is `false`. */
    readonly _editableSearchTerm: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly editableSearchTerm: _angular_core.WritableSignal<boolean>;
    readonly _ngClass: _angular_core.InputSignal<ClassValue>;
    readonly ngClass: _angular_core.WritableSignal<ClassValue>;
    /** Additional CSS classes applied to the dropdown panel. Merged with mirrored host `class`, `[class]`, and `[ngClass]` values. */
    readonly _panelClass: _angular_core.InputSignal<ClassValue>;
    readonly panelClass: _angular_core.WritableSignal<ClassValue>;
    /** Custom autocomplete or advanced filter. */
    readonly _typeahead: _angular_core.InputSignal<Subject<string>>;
    readonly typeahead: _angular_core.WritableSignal<Subject<string>>;
    /** Allows to select multiple items. */
    readonly _multiple: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly multiple: _angular_core.WritableSignal<boolean>;
    /** Allows to create custom options. */
    readonly _addTag: _angular_core.InputSignal<boolean | AddTagFn>;
    readonly addTag: _angular_core.WritableSignal<boolean | AddTagFn>;
    /** Allow to search for value. Default `true` */
    readonly _searchable: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly searchable: _angular_core.WritableSignal<boolean>;
    /** Allow to clear selected value. Default `true` */
    readonly _clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly clearable: _angular_core.WritableSignal<boolean>;
    readonly _clearKeepsDisabledOptions: _angular_core.InputSignalWithTransform<boolean, unknown>;
    readonly clearKeepsDisabledOptions: _angular_core.WritableSignal<boolean>;
    /** Deselects a selected item when it is clicked in the dropdown. Default `false`. Default `true` when **multiple** is `true` */
    readonly _deselectOnClick: _angular_core.InputSignal<boolean>;
    readonly deselectOnClick: _angular_core.WritableSignal<boolean>;
    /** Clears search input when item is selected. Default `true`. Default `false` when **closeOnSelect** is `false` */
    readonly _clearSearchOnAdd: _angular_core.InputSignal<any>;
    readonly clearSearchOnAdd: _angular_core.WritableSignal<any>;
    /** A function to compare the option values with the selected values. The first argument is a value from an option. The second is a value from the selection(model). A boolean should be returned. */
    readonly _compareWith: _angular_core.InputSignalWithTransform<CompareWithFn, CompareWithFn>;
    readonly compareWith: _angular_core.WritableSignal<CompareWithFn>;
    /** Provide custom keyDown function. Executed before default handler. Return false to suppress execution of default key down handlers */
    readonly _keyDownFn: _angular_core.InputSignal<(_: KeyboardEvent) => boolean>;
    readonly keyDownFn: _angular_core.WritableSignal<(_: KeyboardEvent) => boolean>;
    /** @deprecated Has no effect: the CDK overlay renders in the native Popover API top layer automatically in supporting browsers. Will be removed in a future major version. */
    readonly _popover: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /** @deprecated Has no effect: the CDK overlay renders in the native Popover API top layer automatically in supporting browsers. Will be removed in a future major version. */
    readonly popover: _angular_core.WritableSignal<boolean>;
    /** Object property to use for label. Default `label` */
    readonly bindLabel: _angular_core.ModelSignal<string>;
    /** Object property to use for selected model. By default binds to whole object. */
    readonly bindValue: _angular_core.ModelSignal<string>;
    /** Allows to select dropdown appearance. Set to `outline` or `fill` for Material form-field styles (applies only to Material theme) */
    readonly appearance: _angular_core.ModelSignal<string>;
    /** Allows manual control of dropdown opening and closing. `true` - won't close. `false` - won't open. */
    readonly isOpen: _angular_core.ModelSignal<boolean>;
    /** Items array */
    readonly items: _angular_core.ModelSignal<readonly any[]>;
    /** Fired on select blur */
    readonly blurEvent: _angular_core.OutputEmitterRef<any>;
    /** Fired on select focus */
    readonly focusEvent: _angular_core.OutputEmitterRef<any>;
    /** Fired on model change. Outputs whole model */
    readonly changeEvent: _angular_core.OutputEmitterRef<any>;
    /** Fired on select dropdown open */
    readonly openEvent: _angular_core.OutputEmitterRef<void>;
    /** Fired on select dropdown close */
    readonly closeEvent: _angular_core.OutputEmitterRef<void>;
    /** Fired while typing search term. Outputs search term with filtered items */
    readonly searchEvent: _angular_core.OutputEmitterRef<{
        term: string;
        items: any[];
    }>;
    /** Fired on clear icon click */
    readonly clearEvent: _angular_core.OutputEmitterRef<void>;
    /** Fired when item is added while `[multiple]="true"`. Outputs added item */
    readonly addEvent: _angular_core.OutputEmitterRef<any>;
    /** Fired when item is removed while `[multiple]="true"` */
    readonly removeEvent: _angular_core.OutputEmitterRef<any>;
    /** Fired when scrolled (only when `[virtualScroll]="true"`). Provides the start and end index of the currently available items. Can be used for loading more items in chunks before the user has scrolled all the way to the bottom of the list. */
    readonly scroll: _angular_core.OutputEmitterRef<{
        start: number;
        end: number;
    }>;
    /** Fired when scrolled to the end of items. Can be used for loading more items in chunks. */
    readonly scrollToEnd: _angular_core.OutputEmitterRef<any>;
    readonly disabled: _angular_core.Signal<boolean>;
    readonly clearSearchOnAddValue: _angular_core.Signal<any>;
    readonly deselectOnClickValue: _angular_core.Signal<boolean>;
    readonly optionTemplate: _angular_core.Signal<TemplateRef<any>>;
    readonly optgroupTemplate: _angular_core.Signal<TemplateRef<any>>;
    readonly labelTemplate: _angular_core.Signal<TemplateRef<any>>;
    readonly multiLabelTemplate: _angular_core.Signal<TemplateRef<any>>;
    readonly headerTemplate: _angular_core.Signal<TemplateRef<any>>;
    readonly footerTemplate: _angular_core.Signal<TemplateRef<any>>;
    readonly notFoundTemplate: _angular_core.Signal<TemplateRef<any>>;
    readonly placeholderTemplate: _angular_core.Signal<TemplateRef<any>>;
    readonly typeToSearchTemplate: _angular_core.Signal<TemplateRef<any>>;
    readonly loadingTextTemplate: _angular_core.Signal<TemplateRef<any>>;
    readonly tagTemplate: _angular_core.Signal<TemplateRef<any>>;
    readonly loadingSpinnerTemplate: _angular_core.Signal<TemplateRef<any>>;
    readonly clearButtonTemplate: _angular_core.Signal<TemplateRef<any>>;
    readonly ngOptions: _angular_core.Signal<readonly NgOptionComponent[]>;
    readonly dropdownPanel: _angular_core.Signal<any>;
    readonly searchInput: _angular_core.Signal<ElementRef<HTMLInputElement>>;
    readonly clearButton: _angular_core.Signal<ElementRef<HTMLSpanElement>>;
    private readonly _dropdownTemplate;
    private readonly _dropdownOutlet;
    private readonly _selectContainer;
    readonly dropdownId: string;
    readonly element: HTMLElement;
    /** Width of the notched-outline gap for the floated label in the material outline appearance */
    readonly outlineNotchWidth: _angular_core.WritableSignal<number>;
    itemsList: ItemsList;
    viewPortItems: NgOption[];
    tabFocusOnClear: _angular_core.WritableSignal<boolean>;
    private readonly _cd;
    private readonly _console;
    private readonly _destroyRef;
    private readonly autoFocus;
    /** Overlay hosting the dropdown panel while open. Bound into the panel so it can request repositioning. */
    protected dropdownOverlayRef: OverlayRef | null;
    private readonly _defaultLabel;
    private readonly _editableSearchTermActive;
    private readonly _document;
    private _injector;
    private readonly _dropdownOverlay;
    private _isComposing;
    private _itemsAreUsed;
    private readonly _keyPress$;
    private _manualOpen;
    private _pressedKeys;
    private _primitive;
    /** Last value written via `writeValue` or emitted via `_updateNgModel`; re-applied when mode/bindings change. */
    private _lastWrittenValue;
    private readonly _searchTerm;
    private readonly _validTerm;
    /** Consumer classes on the host from static `class` and `[class]` bindings. */
    private readonly _consumerHostClasses;
    /** Classes forwarded to the overlay panel (mirrored host classes + `panelClass`). */
    readonly panelClasses: _angular_core.Signal<string>;
    /**
     * Creates an instance of NgSelectComponent.
     *
     * @since 3.0.0
     */
    constructor();
    /**
     * Measures the placeholder label so the notched outline can leave a real gap in the border
     * for the floated label instead of masking it with an opaque background (material theme).
     * The 0.75 factor matches the `scale(0.75)` the material theme applies to the floated label.
     *
     * @since 23.2.3
     */
    private _measureOutlineNotch;
    private _focused;
    /**
     * Gets whether the component currently owns focus.
     *
     * @returns The focused.
     *
     * @since 20.4.2
     */
    get focused(): boolean;
    /**
     * Gets whether search filtering or text composition is active.
     *
     * @returns The filtered.
     *
     * @since 3.0.0
     */
    get filtered(): boolean;
    /**
     * Gets the search term.
     *
     * @returns The search term.
     *
     * @since 20.4.2
     */
    get searchTerm(): string;
    /**
     * Gets the selected items.
     *
     * @returns The selected items.
     *
     * @since 3.0.0
     */
    get selectedItems(): NgOption[];
    /**
     * Gets the selected values.
     *
     * @returns The selected values.
     *
     * @since 3.0.0
     */
    get selectedValues(): any[];
    /**
     * Determines whether the component has selected values.
     *
     * @returns Whether has value.
     *
     * @since 3.0.0
     */
    get hasValue(): boolean;
    /**
     * Gets the current panel position.
     *
     * @returns The current panel position.
     *
     * @since 3.0.0
     */
    get currentPanelPosition(): DropdownPosition;
    /**
     * Determines whether the add-tag option should be displayed.
     *
     * @returns Whether show add tag.
     *
     * @since 3.0.0
     */
    get showAddTag(): boolean;
    clearItem: (item: any) => void;
    /**
     * Initializes the instance after Angular has assigned its inputs.
     *
     * @since 3.0.0
     */
    ngOnInit(): void;
    /**
     * Responds to Angular input changes.
     *
     * @param changes - The changed Angular inputs.
     *
     * @since 3.0.0
     */
    ngOnChanges(changes: SimpleChanges): void;
    /**
     * Completes initialization that depends on rendered view children.
     *
     * @since 3.0.0
     */
    ngAfterViewInit(): void;
    /**
     * Routes a keyboard event to the appropriate ng-select interaction handler.
     *
     * @param $event - The DOM event to process.
     *
     * @since 3.0.0
     */
    handleKeyDown($event: KeyboardEvent): void;
    /**
     * Handles navigation and selection key codes.
     *
     * @param $event - The DOM event to process.
     *
     * @since 3.1.1
     */
    handleKeyCode($event: KeyboardEvent): void;
    /**
     * Handles keyboard interaction originating from the search input.
     *
     * @param $event - The DOM event to process.
     *
     * @since 11.1.2
     */
    handleKeyCodeInput($event: KeyboardEvent): void;
    /**
     * Handles keyboard interaction on the clear control.
     *
     * @param $event - The DOM event to process.
     *
     * @since 11.1.2
     */
    handleKeyCodeClear($event: KeyboardEvent): void;
    /**
     * Handles keyboard removal of a selected value.
     *
     * @param $event - The DOM event to process.
     * @param item - The option to process.
     *
     * @since 23.3.0
     */
    handleRemoveKeydown($event: KeyboardEvent, item: NgOption): void;
    /**
     * Handles pointer interaction within the select container.
     *
     * @param $event - The DOM event to process.
     *
     * @since 3.0.0
     */
    handleMousedown($event: MouseEvent): boolean;
    /**
     * Toggles the dropdown from the arrow control.
     *
     * @since 3.0.0
     */
    handleArrowClick(): void;
    /**
     * Clears the model from a pointer interaction.
     *
     * @param _event - The DOM event to process.
     *
     * @since 3.0.0
     */
    handleClearClick(_event?: MouseEvent): void;
    /**
     * Clears the selected model values and resets the search state.
     *
     * @since 3.0.0
     */
    clearModel(): void;
    /**
     * Writes a ControlValueAccessor model value into the component.
     *
     * @param value - The value to process.
     *
     * @since 3.0.0
     */
    writeValue(value: any | any[]): void;
    /**
     * Registers the ControlValueAccessor model-change callback.
     *
     * @param fn - The fn.
     *
     * @since 3.0.0
     */
    registerOnChange(fn: any): void;
    /**
     * Registers the ControlValueAccessor touched callback.
     *
     * @param fn - The fn.
     *
     * @since 3.0.0
     */
    registerOnTouched(fn: any): void;
    /**
     * Updates the disabled state supplied by Angular forms.
     *
     * @param state - The state.
     *
     * @since 3.0.0
     */
    setDisabledState(state: boolean): void;
    /**
     * Toggles the dropdown panel.
     *
     * @since 3.0.0
     */
    toggle(): void;
    /**
     * Opens the select dropdown panel
     *
     * @since 3.0.0
     */
    open(): void;
    /**
     * Closes the select dropdown panel
     *
     * @since 3.0.0
     */
    close(): void;
    /**
     * Selects or unselects an option based on its current state.
     *
     * @param item - The option to process.
     *
     * @since 3.0.0
     */
    toggleItem(item: NgOption): void;
    /**
     * Selects an option according to the active selection mode.
     *
     * @param item - The option to process.
     *
     * @since 3.0.0
     */
    select(item: NgOption): void;
    /**
     * Focuses the select element
     *
     * @since 3.0.0
     */
    focus(): void;
    /**
     * Blurs the select element
     *
     * @since 3.0.0
     */
    blur(): void;
    /**
     * Removes an option from the current selection.
     *
     * @param item - The option to process.
     *
     * @since 3.0.0
     */
    unselect(item: NgOption): void;
    /**
     * Creates and selects an option from the current search term.
     *
     * @since 3.0.0
     */
    selectTag(): void;
    /**
     * Determines whether the clear control should be displayed.
     *
     * @since 3.0.0
     */
    showClear(): boolean;
    /**
     * Moves keyboard focus to the clear control.
     *
     * @since 11.1.2
     */
    focusOnClear(): void;
    trackByOption: (_: number, item: NgOption) => any;
    /**
     * Determines whether the empty-results message should be displayed.
     *
     * @since 3.0.0
     */
    showNoItemsFound(): boolean;
    /**
     * Determines whether the type-to-search prompt should be displayed.
     *
     * @since 3.0.0
     */
    showTypeToSearch(): boolean;
    /**
     * Marks the start of an input method editor composition.
     *
     * @since 3.0.5
     */
    onCompositionStart(): void;
    /**
     * Finishes input method editor composition and applies the search term.
     *
     * @param term - The term.
     *
     * @since 3.0.5
     */
    onCompositionEnd(term: string): void;
    /**
     * Filters the available options using the current search configuration.
     *
     * @param term - The term.
     *
     * @since 3.0.0
     */
    filter(term: string): void;
    /**
     * Handles focus entering the search input.
     *
     * @param $event - The DOM event to process.
     *
     * @since 3.0.0
     */
    onInputFocus($event: FocusEvent): void;
    /**
     * Handles focus leaving the search input.
     *
     * @param $event - The DOM event to process.
     *
     * @since 3.0.0
     */
    onInputBlur($event: FocusEvent): void;
    /**
     * Marks an option when pointer interaction hovers it.
     *
     * @param item - The option to process.
     *
     * @since 3.0.0
     */
    onItemHover(item: NgOption): void;
    /**
     * Requests an OnPush change-detection pass.
     *
     * @since 3.0.0
     */
    detectChanges(): void;
    private _onChange;
    private _onTouched;
    /**
     * Registers effects that synchronize signal-based inputs with component state.
     *
     * @since 23.0.4
     */
    private _handleSignalChanges;
    /**
     * Restores the editable search term from the selected option.
     *
     * @since 3.7.3
     */
    private _setSearchTermFromItems;
    /**
     * Re-applies the last written form value against the current mode and bindings.
     *
     * @since 24.0.5
     */
    private _resyncSelectionFromWrittenValue;
    /**
     * Maps the bound items collection into the internal option list.
     *
     * @param items - The options to process.
     *
     * @since 3.0.0
     */
    private _setItems;
    /**
     * Maps projected `ng-option` components into the internal option list.
     *
     * @since 3.0.0
     */
    private _setItemsFromNgOptions;
    /**
     * Maps a valid external model value into selected options.
     *
     * @param value - The form value.
     *
     * @since 3.0.0
     */
    private _handleWriteValue;
    /**
     * Matches typed characters to options for keyboard navigation.
     *
     * @since 3.0.0
     */
    private _handleKeyPresses;
    /**
     * Applies configured attributes to the native search input.
     *
     * @since 3.0.0
     */
    private _setInputAttributes;
    /**
     * Updates whether Tab should move focus to the clear control.
     *
     * @since 15.1.0
     */
    private _setTabFocusOnClear;
    /**
     * Builds and emits the current ControlValueAccessor model value.
     *
     * @since 3.0.0
     */
    private _updateNgModel;
    /**
     * Clears the current search term when configuration permits it.
     *
     * @since 3.0.0
     */
    private _clearSearch;
    /**
     * Updates the search term and emits the search event.
     *
     * @param searchTerm - The search term.
     *
     * @since 3.0.6
     */
    private _changeSearch;
    /**
     * Scrolls the dropdown to the currently marked option.
     *
     * @since 3.0.0
     */
    private _scrollToMarked;
    /**
     * Scrolls the dropdown to the add-tag option.
     *
     * @since 3.0.0
     */
    private _scrollToTag;
    /**
     * Synchronizes search and close behavior after selection changes.
     *
     * @since 3.0.0
     */
    private _onSelectionChanged;
    /**
     * Attaches or detaches the dropdown overlay to match the current open state. Idempotent.
     *
     * @since 23.7.0
     */
    private _syncDropdownOverlay;
    /**
     * The dropdown anchors to the `.ng-select-container` box, not the host: themes may pad
     * the host below the container (material reserves 1.25em of subscript space under the
     * underline), and the panel must sit flush against the visible field — the same anchor
     * the pre-overlay `appendTo` positioning used.
     *
     * @since 23.7.0
     */
    private _dropdownOrigin;
    /**
     * Reports development-mode warnings for deprecated inputs.
     *
     * @since 23.7.0
     */
    private _warnDeprecatedInputs;
    /**
     * Handles Tab selection, clear-control focus, and close behavior.
     *
     * @param $event - The DOM event to process.
     *
     * @since 3.0.0
     */
    private _handleTab;
    /**
     * Handles Enter selection and dropdown opening.
     *
     * @param $event - The DOM event to process.
     *
     * @since 3.0.0
     */
    private _handleEnter;
    /**
     * Handles Space selection and dropdown opening.
     *
     * @param $event - The DOM event to process.
     *
     * @since 3.0.0
     */
    private _handleSpace;
    /**
     * Moves the marked option down or opens the dropdown.
     *
     * @param $event - The DOM event to process.
     *
     * @since 3.0.0
     */
    private _handleArrowDown;
    /**
     * Moves the marked option up or opens the dropdown.
     *
     * @param $event - The DOM event to process.
     *
     * @since 3.0.0
     */
    private _handleArrowUp;
    /**
     * Determines whether the next keyboard target is the add-tag option.
     *
     * @param nextStep - The next step.
     * @returns Whether next item is tag.
     *
     * @since 3.0.0
     */
    private _nextItemIsTag;
    /**
     * Removes the last selected value when Backspace clearing is enabled.
     *
     * @since 3.0.0
     */
    private _handleBackspace;
    /**
     * Applies configured global defaults that were not set locally.
     *
     * @param config - The global ng-select configuration.
     *
     * @since 3.0.0
     */
    private _mergeGlobalConfig;
    /**
     * Gets virtual scroll value from input or from config
     *
     *  @param config NgSelectConfig object
     *
     *  @returns `true` if virtual scroll is enabled, `false` otherwise
     *
     * @since 14.7.0
     */
    private getVirtualScroll;
    /**
     * Gets disableVirtualScroll value from input or from config
     *
     *  @param config NgSelectConfig object
     *
     *  @returns `true` if disableVirtualScroll is enabled, `false` otherwise
     *
     * @since 14.7.0
     */
    private isVirtualScrollDisabled;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgSelectComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgSelectComponent, "ng-select", ["ngSelect"], { "_ariaLabelDropdown": { "alias": "ariaLabelDropdown"; "required": false; "isSignal": true; }; "_ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "_markFirst": { "alias": "markFirst"; "required": false; "isSignal": true; }; "_placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "_fixedPlaceholder": { "alias": "fixedPlaceholder"; "required": false; "isSignal": true; }; "_notFoundText": { "alias": "notFoundText"; "required": false; "isSignal": true; }; "_typeToSearchText": { "alias": "typeToSearchText"; "required": false; "isSignal": true; }; "_preventToggleOnRightClick": { "alias": "preventToggleOnRightClick"; "required": false; "isSignal": true; }; "_addTagText": { "alias": "addTagText"; "required": false; "isSignal": true; }; "_loadingText": { "alias": "loadingText"; "required": false; "isSignal": true; }; "_clearAllText": { "alias": "clearAllText"; "required": false; "isSignal": true; }; "_removeText": { "alias": "removeText"; "required": false; "isSignal": true; }; "_dropdownPosition": { "alias": "dropdownPosition"; "required": false; "isSignal": true; }; "_appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "_outsideClickEvent": { "alias": "outsideClickEvent"; "required": false; "isSignal": true; }; "_loading": { "alias": "loading"; "required": false; "isSignal": true; }; "_closeOnSelect": { "alias": "closeOnSelect"; "required": false; "isSignal": true; }; "_hideSelected": { "alias": "hideSelected"; "required": false; "isSignal": true; }; "_selectOnTab": { "alias": "selectOnTab"; "required": false; "isSignal": true; }; "_openOnEnter": { "alias": "openOnEnter"; "required": false; "isSignal": true; }; "_maxSelectedItems": { "alias": "maxSelectedItems"; "required": false; "isSignal": true; }; "_groupBy": { "alias": "groupBy"; "required": false; "isSignal": true; }; "_groupValue": { "alias": "groupValue"; "required": false; "isSignal": true; }; "_bufferAmount": { "alias": "bufferAmount"; "required": false; "isSignal": true; }; "_virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "_selectableGroup": { "alias": "selectableGroup"; "required": false; "isSignal": true; }; "_tabFocusOnClearButton": { "alias": "tabFocusOnClearButton"; "required": false; "isSignal": true; }; "_selectableGroupAsModel": { "alias": "selectableGroupAsModel"; "required": false; "isSignal": true; }; "_searchFn": { "alias": "searchFn"; "required": false; "isSignal": true; }; "_trackByFn": { "alias": "trackByFn"; "required": false; "isSignal": true; }; "_clearOnBackspace": { "alias": "clearOnBackspace"; "required": false; "isSignal": true; }; "_labelForId": { "alias": "labelForId"; "required": false; "isSignal": true; }; "_inputAttrs": { "alias": "inputAttrs"; "required": false; "isSignal": true; }; "_tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "_readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "_searchWhileComposing": { "alias": "searchWhileComposing"; "required": false; "isSignal": true; }; "_minTermLength": { "alias": "minTermLength"; "required": false; "isSignal": true; }; "_editableSearchTerm": { "alias": "editableSearchTerm"; "required": false; "isSignal": true; }; "_ngClass": { "alias": "ngClass"; "required": false; "isSignal": true; }; "_panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "_typeahead": { "alias": "typeahead"; "required": false; "isSignal": true; }; "_multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "_addTag": { "alias": "addTag"; "required": false; "isSignal": true; }; "_searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "_clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "_clearKeepsDisabledOptions": { "alias": "clearKeepsDisabledOptions"; "required": false; "isSignal": true; }; "_deselectOnClick": { "alias": "deselectOnClick"; "required": false; "isSignal": true; }; "_clearSearchOnAdd": { "alias": "clearSearchOnAdd"; "required": false; "isSignal": true; }; "_compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "_keyDownFn": { "alias": "keyDownFn"; "required": false; "isSignal": true; }; "_popover": { "alias": "popover"; "required": false; "isSignal": true; }; "bindLabel": { "alias": "bindLabel"; "required": false; "isSignal": true; }; "bindValue": { "alias": "bindValue"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; }, { "bindLabel": "bindLabelChange"; "bindValue": "bindValueChange"; "appearance": "appearanceChange"; "isOpen": "isOpenChange"; "items": "itemsChange"; "blurEvent": "blur"; "focusEvent": "focus"; "changeEvent": "change"; "openEvent": "open"; "closeEvent": "close"; "searchEvent": "search"; "clearEvent": "clear"; "addEvent": "add"; "removeEvent": "remove"; "scroll": "scroll"; "scrollToEnd": "scrollToEnd"; }, ["optionTemplate", "optgroupTemplate", "labelTemplate", "multiLabelTemplate", "headerTemplate", "footerTemplate", "notFoundTemplate", "placeholderTemplate", "typeToSearchTemplate", "loadingTextTemplate", "tagTemplate", "loadingSpinnerTemplate", "clearButtonTemplate", "ngOptions"], never, true, never>;
}

/**
 * Provides the compatibility NgModule wrapper for the standalone ng-select declarations.
 *
 * @since 3.0.0
 */
declare class NgSelectModule {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgSelectModule, never>;
    static ɵmod: _angular_core.ɵɵNgModuleDeclaration<NgSelectModule, never, [typeof NgDropdownPanelComponent, typeof NgOptionComponent, typeof NgSelectComponent, typeof NgOptgroupTemplateDirective, typeof NgOptionTemplateDirective, typeof NgLabelTemplateDirective, typeof NgMultiLabelTemplateDirective, typeof NgHeaderTemplateDirective, typeof NgFooterTemplateDirective, typeof NgPlaceholderTemplateDirective, typeof NgClearButtonTemplateDirective, typeof NgNotFoundTemplateDirective, typeof NgTypeToSearchTemplateDirective, typeof NgLoadingTextTemplateDirective, typeof NgTagTemplateDirective, typeof NgLoadingSpinnerTemplateDirective, typeof NgItemLabelDirective], [typeof NgSelectComponent, typeof NgOptionComponent, typeof NgOptgroupTemplateDirective, typeof NgOptionTemplateDirective, typeof NgLabelTemplateDirective, typeof NgMultiLabelTemplateDirective, typeof NgHeaderTemplateDirective, typeof NgFooterTemplateDirective, typeof NgPlaceholderTemplateDirective, typeof NgNotFoundTemplateDirective, typeof NgTypeToSearchTemplateDirective, typeof NgLoadingTextTemplateDirective, typeof NgTagTemplateDirective, typeof NgLoadingSpinnerTemplateDirective, typeof NgClearButtonTemplateDirective]>;
    static ɵinj: _angular_core.ɵɵInjectorDeclaration<NgSelectModule>;
}

/**
 * Reports developer-facing warnings through the configured console.
 *
 * @since 3.0.0
 */
declare class ConsoleService {
    /**
     * Writes a developer-facing warning to the console.
     *
     * @param message - The message.
     *
     * @since 3.0.0
     */
    warn(message: string): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConsoleService, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<ConsoleService>;
}

export { ConsoleService, DefaultSelectionModel, DefaultSelectionModelFactory, NgClearButtonTemplateDirective, NgDropdownPanelComponent, NgDropdownPanelService, NgFooterTemplateDirective, NgHeaderTemplateDirective, NgItemLabelDirective, NgLabelTemplateDirective, NgLoadingSpinnerTemplateDirective, NgLoadingTextTemplateDirective, NgMultiLabelTemplateDirective, NgNotFoundTemplateDirective, NgOptgroupTemplateDirective, NgOptionComponent, NgOptionTemplateDirective, NgPlaceholderTemplateDirective, NgSelectComponent, NgSelectConfig, NgSelectModule, NgTagTemplateDirective, NgTypeToSearchTemplateDirective, SELECTION_MODEL_FACTORY };
export type { DropdownPosition, NgOption, SelectionModel };
