import * as polytype from 'polytype';
import * as _angular_core from '@angular/core';
import { TemplateRef } from '@angular/core';
import { AXEvent, MXInputBaseValueComponent, MXLookComponent, AXHtmlEvent, AXFocusEvent } from '@acorex/cdk/common';
import { AXListNavigationDirective, AXListNavigationItemDirective } from '@acorex/cdk/list-navigation';
import { AXSearchBoxComponent } from '@acorex/components/search-box';

type AXCommandItem = {
    id: string | number;
    text: string;
    icon?: string;
    href?: string;
    children?: AXCommandItem[];
    index?: number;
    data?: any;
};
type forceId = {
    id: string | number;
};
type AXCommandMenuItem<T extends forceId = AXCommandItem> = {
    pinned?: {
        title?: string;
        items: T[];
    };
    list: {
        title?: string;
        items: T[];
    };
};
declare class AXCommandComponentEvent extends AXEvent {
    data: AXCommandItem;
}
type AXCommandFooter = {
    navigation: boolean;
    select: boolean;
    close: boolean;
};

declare const AXCommandComponent_base: polytype.Polytype.ClusteredConstructor<[{
    new (): MXInputBaseValueComponent<AXCommandMenuItem>;
    ɵfac: _angular_core.ɵɵFactoryDeclaration<MXInputBaseValueComponent<any>, never>;
    ɵprov: _angular_core.ɵɵInjectableDeclaration<MXInputBaseValueComponent<any>>;
}, typeof MXLookComponent]>;
declare class AXCommandComponent extends AXCommandComponent_base {
    protected searchValue: _angular_core.WritableSignal<string>;
    protected searchBox: _angular_core.Signal<AXSearchBoxComponent>;
    readonly onSubmit: _angular_core.OutputEmitterRef<AXCommandComponentEvent>;
    readonly onEscape: _angular_core.OutputEmitterRef<AXHtmlEvent<KeyboardEvent>>;
    readonly onSearchBoxFocus: _angular_core.OutputEmitterRef<AXHtmlEvent<FocusEvent>>;
    readonly onSearchBoxBlur: _angular_core.OutputEmitterRef<AXHtmlEvent<FocusEvent>>;
    protected listNavigation: _angular_core.Signal<AXListNavigationDirective>;
    private listNav;
    /**
     * The custom template used for rendering content.
     *
     * @param {TemplateRef<any>} customTemplate
     */
    customTemplate: _angular_core.InputSignal<TemplateRef<any>>;
    searchBar: _angular_core.InputSignal<boolean>;
    divider: _angular_core.InputSignal<boolean>;
    searchKey: _angular_core.InputSignal<string>;
    footerButtons: _angular_core.InputSignal<AXCommandFooter>;
    protected displayItems: _angular_core.Signal<AXCommandItem[]>;
    protected focusHandler(e: AXFocusEvent): void;
    protected blurHandler(e: AXFocusEvent): void;
    private filterRecursive;
    protected onItemClick(item: AXCommandItem): void;
    protected keyPress(e: AXHtmlEvent<KeyboardEvent>, item: AXCommandItem): void;
    protected searchEscapeHandler(e: AXHtmlEvent<KeyboardEvent>): void;
    protected closeHandler(e: AXHtmlEvent<KeyboardEvent>): void;
    protected activeHandler(l: AXListNavigationDirective, i: AXListNavigationItemDirective): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommandComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXCommandComponent, "ax-command", never, { "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "value": { "alias": "value"; "required": false; }; "state": { "alias": "state"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "customTemplate": { "alias": "customTemplate"; "required": false; "isSignal": true; }; "searchBar": { "alias": "searchBar"; "required": false; "isSignal": true; }; "divider": { "alias": "divider"; "required": false; "isSignal": true; }; "searchKey": { "alias": "searchKey"; "required": false; "isSignal": true; }; "footerButtons": { "alias": "footerButtons"; "required": false; "isSignal": true; }; }, { "onSubmit": "onSubmit"; "onEscape": "onEscape"; "onSearchBoxFocus": "onSearchBoxFocus"; "onSearchBoxBlur": "onSearchBoxBlur"; }, never, never, true, never>;
}

declare class AXCommandModule {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXCommandModule, never>;
    static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXCommandModule, never, [typeof AXCommandComponent], [typeof AXCommandComponent]>;
    static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXCommandModule>;
}

export { AXCommandComponent, AXCommandComponentEvent, AXCommandModule };
export type { AXCommandFooter, AXCommandItem, AXCommandMenuItem };
