import * as i0 from '@angular/core';
import { ElementRef, EventEmitter, OnInit, AfterViewInit, OnChanges, TemplateRef, QueryList, SimpleChanges } from '@angular/core';
import { Direction } from '@angular/cdk/bidi';
import { OnChangeType, OnTouchedType, NzSafeAny, NzStatus, NzVariant, NgClassInterface, NzValidateStatus } from 'ng-zorro-antd/core/types';
import { ControlValueAccessor } from '@angular/forms';

declare class NzMentionTriggerDirective implements ControlValueAccessor {
    readonly elementRef: ElementRef<HTMLInputElement | HTMLTextAreaElement>;
    private readonly ngZone;
    private readonly cdr;
    private readonly destroyRef;
    readonly onFocusin: EventEmitter<FocusEvent>;
    readonly onBlur: EventEmitter<FocusEvent>;
    readonly onInput: EventEmitter<KeyboardEvent>;
    readonly onKeydown: EventEmitter<KeyboardEvent>;
    readonly onClick: EventEmitter<MouseEvent>;
    readonly value: i0.WritableSignal<string>;
    readonly disabled: i0.WritableSignal<boolean>;
    constructor();
    completeEvents(): void;
    focus(caretPos?: number | null): void;
    insertMention(mention: Mention): void;
    clear(): void;
    writeValue(value: string): void;
    onChange: OnChangeType;
    onTouched: OnTouchedType;
    registerOnChange(fn: (value: string) => void): void;
    registerOnTouched(fn: () => void): void;
    setDisabledState(isDisabled: boolean): void;
    protected handleBlur(): void;
    private setupEventListener;
    static ɵfac: i0.ɵɵFactoryDeclaration<NzMentionTriggerDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<NzMentionTriggerDirective, "input[nzMentionTrigger], textarea[nzMentionTrigger]", ["nzMentionTrigger"], {}, { "onFocusin": "onFocusin"; "onBlur": "onBlur"; "onInput": "onInput"; "onKeydown": "onKeydown"; "onClick": "onClick"; }, never, never, true, never>;
}

interface MentionOnSearchTypes {
    value: string;
    prefix: string;
}
interface Mention {
    startPos: number;
    endPos: number;
    mention: string;
}
type MentionPlacement = 'top' | 'bottom';
declare class NzMentionComponent implements OnInit, AfterViewInit, OnChanges {
    private ngZone;
    private directionality;
    private cdr;
    private injector;
    private viewContainerRef;
    private elementRef;
    private renderer;
    private destroyRef;
    nzValueWith: (value: NzSafeAny) => string;
    nzPrefix: string | string[];
    nzLoading: boolean;
    nzNotFoundContent: string;
    nzPlacement: MentionPlacement;
    nzSuggestions: NzSafeAny[];
    nzStatus: NzStatus;
    nzVariant: NzVariant | undefined;
    nzAllowClear: boolean;
    nzClearIcon: TemplateRef<NzSafeAny> | null;
    readonly nzOnSelect: EventEmitter<any>;
    readonly nzOnSearchChange: EventEmitter<MentionOnSearchTypes>;
    readonly nzOnClear: EventEmitter<void>;
    suggestionsTemp?: TemplateRef<void>;
    items: QueryList<ElementRef>;
    set suggestionChild(value: TemplateRef<{
        $implicit: NzSafeAny;
    }>);
    readonly trigger: i0.Signal<NzMentionTriggerDirective>;
    isOpen: boolean;
    filteredSuggestions: string[];
    suggestionTemplate: TemplateRef<{
        $implicit: NzSafeAny;
    }> | null;
    activeIndex: number;
    dir: Direction;
    prefixCls: string;
    statusCls: NgClassInterface;
    status: NzValidateStatus;
    hasFeedback: boolean;
    readonly focused: i0.WritableSignal<boolean>;
    readonly disabled: i0.Signal<boolean>;
    readonly hasValue: i0.Signal<boolean>;
    private previousValue;
    private cursorMention;
    private cursorMentionStart?;
    private cursorMentionEnd?;
    private overlayRef;
    private portal?;
    private positionStrategy;
    private overlayOutsideClickSubscription;
    private document;
    private get triggerNativeElement();
    private get focusItemElement();
    private nzFormStatusService;
    private nzFormNoStatusService;
    private readonly formVariant;
    protected readonly variant: i0.WritableSignal<NzVariant | undefined>;
    protected readonly finalVariant: i0.Signal<NzVariant>;
    constructor();
    ngOnInit(): void;
    ngOnChanges(changes: SimpleChanges): void;
    ngAfterViewInit(): void;
    closeDropdown(): void;
    openDropdown(): void;
    getMentions(): string[];
    selectSuggestion(suggestion: string | {}): void;
    clear(): void;
    private handleInput;
    private handleKeydown;
    private handleClick;
    private bindTriggerEvents;
    private suggestionsFilter;
    private resetDropdown;
    private setNextItemActive;
    private setPreviousItemActive;
    private scrollToFocusItem;
    private canOpen;
    private resetCursorMention;
    private updatePositions;
    private subscribeOverlayOutsideClick;
    private attachOverlay;
    private getOverlayPosition;
    private setStatusStyles;
    static ɵfac: i0.ɵɵFactoryDeclaration<NzMentionComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<NzMentionComponent, "nz-mention", ["nzMention"], { "nzValueWith": { "alias": "nzValueWith"; "required": false; }; "nzPrefix": { "alias": "nzPrefix"; "required": false; }; "nzLoading": { "alias": "nzLoading"; "required": false; }; "nzNotFoundContent": { "alias": "nzNotFoundContent"; "required": false; }; "nzPlacement": { "alias": "nzPlacement"; "required": false; }; "nzSuggestions": { "alias": "nzSuggestions"; "required": false; }; "nzStatus": { "alias": "nzStatus"; "required": false; }; "nzVariant": { "alias": "nzVariant"; "required": false; }; "nzAllowClear": { "alias": "nzAllowClear"; "required": false; }; "nzClearIcon": { "alias": "nzClearIcon"; "required": false; }; }, { "nzOnSelect": "nzOnSelect"; "nzOnSearchChange": "nzOnSearchChange"; "nzOnClear": "nzOnClear"; }, ["trigger", "suggestionChild"], ["*"], true, never>;
    static ngAcceptInputType_nzLoading: unknown;
    static ngAcceptInputType_nzAllowClear: unknown;
}

declare class NzMentionSuggestionDirective {
    static ɵfac: i0.ɵɵFactoryDeclaration<NzMentionSuggestionDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<NzMentionSuggestionDirective, "[nzMentionSuggestion]", ["nzMentionSuggestion"], {}, {}, never, never, true, never>;
}

declare class NzMentionModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<NzMentionModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<NzMentionModule, never, [typeof NzMentionComponent, typeof NzMentionTriggerDirective, typeof NzMentionSuggestionDirective], [typeof NzMentionComponent, typeof NzMentionTriggerDirective, typeof NzMentionSuggestionDirective]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<NzMentionModule>;
}

export { NzMentionComponent, NzMentionModule, NzMentionSuggestionDirective, NzMentionTriggerDirective };
export type { Mention, MentionOnSearchTypes, MentionPlacement };
