import { QueryList, EventEmitter, TemplateRef, OnInit, AfterViewInit, OnDestroy, ElementRef } from '@angular/core';
import { DisplayDensityBase, IDisplayDensityOptions } from '../core/displayDensity';
import { ToggleAnimationSettings } from '../expansion-panel/toggle-animation-component';
import { IgxTreeSelectionType, IgxTree, ITreeNodeToggledEventArgs, ITreeNodeTogglingEventArgs, ITreeNodeSelectionEvent, IgxTreeNode, IgxTreeSearchResolver } from './common';
import { IgxTreeNavigationService } from './tree-navigation.service';
import { IgxTreeNodeComponent } from './tree-node/tree-node.component';
import { IgxTreeSelectionService } from './tree-selection.service';
import { IgxTreeService } from './tree.service';
import * as i0 from "@angular/core";
import * as i1 from "./tree-node/tree-node.component";
import * as i2 from "@angular/common";
import * as i3 from "@angular/forms";
import * as i4 from "../icon/public_api";
import * as i5 from "../input-group/input-group.component";
import * as i6 from "../checkbox/checkbox.component";
import * as i7 from "../progressbar/progressbar.component";
import * as i8 from "../expansion-panel/expansion-panel.module";
/**
 * @hidden @internal
 * Used for templating the select marker of the tree
 */
export declare class IgxTreeSelectMarkerDirective {
    static ɵfac: i0.ɵɵFactoryDeclaration<IgxTreeSelectMarkerDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<IgxTreeSelectMarkerDirective, "[igxTreeSelectMarker]", never, {}, {}, never, never, false>;
}
/**
 * @hidden @internal
 * Used for templating the expand indicator of the tree
 */
export declare class IgxTreeExpandIndicatorDirective {
    static ɵfac: i0.ɵɵFactoryDeclaration<IgxTreeExpandIndicatorDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<IgxTreeExpandIndicatorDirective, "[igxTreeExpandIndicator]", never, {}, {}, never, never, false>;
}
export declare class IgxTreeComponent extends DisplayDensityBase implements IgxTree, OnInit, AfterViewInit, OnDestroy {
    private navService;
    private selectionService;
    private treeService;
    private element;
    protected _displayDensityOptions?: IDisplayDensityOptions;
    cssClass: string;
    /**
     * Gets/Sets tree selection mode
     *
     * @remarks
     * By default the tree selection mode is 'None'
     * @param selectionMode: IgxTreeSelectionType
     */
    get selection(): IgxTreeSelectionType;
    set selection(selectionMode: IgxTreeSelectionType);
    /** Get/Set how the tree should handle branch expansion.
     * If set to `true`, only a single branch can be expanded at a time, collapsing all others
     *
     * ```html
     * <igx-tree [singleBranchExpand]="true">
     * ...
     * </igx-tree>
     * ```
     *
     * ```typescript
     * const tree: IgxTree = this.tree;
     * this.tree.singleBranchExpand = false;
     * ```
     */
    singleBranchExpand: boolean;
    /** Get/Set the animation settings that branches should use when expanding/collpasing.
     *
     * ```html
     * <igx-tree [animationSettings]="customAnimationSettings">
     * </igx-tree>
     * ```
     *
     * ```typescript
     * const animationSettings: ToggleAnimationSettings = {
     *      openAnimation: growVerIn,
     *      closeAnimation: growVerOut
     * };
     *
     * this.tree.animationSettings = animationSettings;
     * ```
     */
    animationSettings: ToggleAnimationSettings;
    /** Emitted when the node selection is changed through interaction
     *
     * ```html
     * <igx-tree (nodeSelection)="handleNodeSelection($event)">
     * </igx-tree>
     * ```
     *
     *```typescript
     * public handleNodeSelection(event: ITreeNodeSelectionEvent) {
     *  const newSelection: IgxTreeNode<any>[] = event.newSelection;
     *  const added: IgxTreeNode<any>[] = event.added;
     *  console.log("New selection will be: ", newSelection);
     *  console.log("Added nodes: ", event.added);
     * }
     *```
     */
    nodeSelection: EventEmitter<ITreeNodeSelectionEvent>;
    /** Emitted when a node is expanding, before it finishes
     *
     * ```html
     * <igx-tree (nodeExpanding)="handleNodeExpanding($event)">
     * </igx-tree>
     * ```
     *
     *```typescript
     * public handleNodeExpanding(event: ITreeNodeTogglingEventArgs) {
     *  const expandedNode: IgxTreeNode<any> = event.node;
     *  if (expandedNode.disabled) {
     *      event.cancel = true;
     *  }
     * }
     *```
     */
    nodeExpanding: EventEmitter<ITreeNodeTogglingEventArgs>;
    /** Emitted when a node is expanded, after it finishes
     *
     * ```html
     * <igx-tree (nodeExpanded)="handleNodeExpanded($event)">
     * </igx-tree>
     * ```
     *
     *```typescript
     * public handleNodeExpanded(event: ITreeNodeToggledEventArgs) {
     *  const expandedNode: IgxTreeNode<any> = event.node;
     *  console.log("Node is expanded: ", expandedNode.data);
     * }
     *```
     */
    nodeExpanded: EventEmitter<ITreeNodeToggledEventArgs>;
    /** Emitted when a node is collapsing, before it finishes
     *
     * ```html
     * <igx-tree (nodeCollapsing)="handleNodeCollapsing($event)">
     * </igx-tree>
     * ```
     *
     *```typescript
     * public handleNodeCollapsing(event: ITreeNodeTogglingEventArgs) {
     *  const collapsedNode: IgxTreeNode<any> = event.node;
     *  if (collapsedNode.alwaysOpen) {
     *      event.cancel = true;
     *  }
     * }
     *```
     */
    nodeCollapsing: EventEmitter<ITreeNodeTogglingEventArgs>;
    /** Emitted when a node is collapsed, after it finishes
     *
     * @example
     * ```html
     * <igx-tree (nodeCollapsed)="handleNodeCollapsed($event)">
     * </igx-tree>
     * ```
     * ```typescript
     * public handleNodeCollapsed(event: ITreeNodeToggledEventArgs) {
     *  const collapsedNode: IgxTreeNode<any> = event.node;
     *  console.log("Node is collapsed: ", collapsedNode.data);
     * }
     * ```
     */
    nodeCollapsed: EventEmitter<ITreeNodeToggledEventArgs>;
    /**
     * Emitted when the active node is changed.
     *
     * @example
     * ```
     * <igx-tree (activeNodeChanged)="activeNodeChanged($event)"></igx-tree>
     * ```
     */
    activeNodeChanged: EventEmitter<IgxTreeNode<any>>;
    /**
     * A custom template to be used for the expand indicator of nodes
     * ```html
     * <igx-tree>
     *  <ng-template igxTreeExpandIndicator let-expanded>
     *      <igx-icon>{{ expanded ? "close_fullscreen": "open_in_full"}}</igx-icon>
     *  </ng-template>
     * </igx-tree>
     * ```
     */
    expandIndicator: TemplateRef<any>;
    /** @hidden @internal */
    nodes: QueryList<IgxTreeNodeComponent<any>>;
    /** @hidden @internal */
    disabledChange: EventEmitter<IgxTreeNode<any>>;
    /**
     * Returns all **root level** nodes
     *
     * ```typescript
     * const tree: IgxTree = this.tree;
     * const rootNodes: IgxTreeNodeComponent<any>[] = tree.rootNodes;
     * ```
     */
    get rootNodes(): IgxTreeNodeComponent<any>[];
    /**
     * Emitted when the active node is set through API
     *
     * @hidden @internal
     */
    activeNodeBindingChange: EventEmitter<IgxTreeNode<any>>;
    /** @hidden @internal */
    forceSelect: any[];
    private _selection;
    private destroy$;
    private unsubChildren$;
    constructor(navService: IgxTreeNavigationService, selectionService: IgxTreeSelectionService, treeService: IgxTreeService, element: ElementRef<HTMLElement>, _displayDensityOptions?: IDisplayDensityOptions);
    /** @hidden @internal */
    get nativeElement(): HTMLElement;
    /**
     * Expands all of the passed nodes.
     * If no nodes are passed, expands ALL nodes
     *
     * @param nodes nodes to be expanded
     *
     * ```typescript
     * const targetNodes: IgxTreeNode<any> = this.tree.findNodes(true, (_data: any, node: IgxTreeNode<any>) => node.data.expandable);
     * tree.expandAll(nodes);
     * ```
     */
    expandAll(nodes?: IgxTreeNode<any>[]): void;
    /**
     * Collapses all of the passed nodes.
     * If no nodes are passed, collapses ALL nodes
     *
     * @param nodes nodes to be collapsed
     *
     * ```typescript
     * const targetNodes: IgxTreeNode<any> = this.tree.findNodes(true, (_data: any, node: IgxTreeNode<any>) => node.data.collapsible);
     * tree.collapseAll(nodes);
     * ```
     */
    collapseAll(nodes?: IgxTreeNode<any>[]): void;
    /**
     * Deselect all nodes if the nodes collection is empty. Otherwise, deselect the nodes in the nodes collection.
     *
     * @example
     * ```typescript
     *  const arr = [
     *      this.tree.nodes.toArray()[0],
     *      this.tree.nodes.toArray()[1]
     *  ];
     *  this.tree.deselectAll(arr);
     * ```
     * @param nodes: IgxTreeNodeComponent<any>[]
     */
    deselectAll(nodes?: IgxTreeNodeComponent<any>[]): void;
    /**
     * Returns all of the nodes that match the passed searchTerm.
     * Accepts a custom comparer function for evaluating the search term against the nodes.
     *
     * @remark
     * Default search compares the passed `searchTerm` against the node's `data` Input.
     * When using `findNodes` w/o a `comparer`, make sure all nodes have `data` passed.
     *
     * @param searchTerm The data of the searched node
     * @param comparer A custom comparer function that evaluates the passed `searchTerm` against all nodes.
     * @returns Array of nodes that match the search. `null` if no nodes are found.
     *
     * ```html
     * <igx-tree>
     *     <igx-tree-node *ngFor="let node of data" [data]="node">
     *          {{ node.label }}
     *     </igx-tree-node>
     * </igx-tree>
     * ```
     *
     * ```typescript
     * public data: DataEntry[] = FETCHED_DATA;
     * ...
     * const matchedNodes: IgxTreeNode<DataEntry>[] = this.tree.findNodes<DataEntry>(searchTerm: data[5]);
     * ```
     *
     * Using a custom comparer
     * ```typescript
     * public data: DataEntry[] = FETCHED_DATA;
     * ...
     * const comparer: IgxTreeSearchResolver = (data: any, node: IgxTreeNode<DataEntry>) {
     *      return node.data.index % 2 === 0;
     * }
     * const evenIndexNodes: IgxTreeNode<DataEntry>[] = this.tree.findNodes<DataEntry>(null, comparer);
     * ```
     */
    findNodes(searchTerm: any, comparer?: IgxTreeSearchResolver): IgxTreeNodeComponent<any>[] | null;
    /** @hidden @internal */
    handleKeydown(event: KeyboardEvent): void;
    /** @hidden @internal */
    ngOnInit(): void;
    /** @hidden @internal */
    ngAfterViewInit(): void;
    /** @hidden @internal */
    ngOnDestroy(): void;
    private expandToNode;
    private subToCollapsing;
    private subToChanges;
    private scrollNodeIntoView;
    private _comparer;
    static ɵfac: i0.ɵɵFactoryDeclaration<IgxTreeComponent, [null, null, null, null, { optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<IgxTreeComponent, "igx-tree", never, { "selection": "selection"; "singleBranchExpand": "singleBranchExpand"; "animationSettings": "animationSettings"; }, { "nodeSelection": "nodeSelection"; "nodeExpanding": "nodeExpanding"; "nodeExpanded": "nodeExpanded"; "nodeCollapsing": "nodeCollapsing"; "nodeCollapsed": "nodeCollapsed"; "activeNodeChanged": "activeNodeChanged"; }, ["expandIndicator", "nodes"], ["igx-tree-node"], false>;
}
/**
 * @hidden
 *
 * NgModule defining the components and directives needed for `igx-tree`
 */
export declare class IgxTreeModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<IgxTreeModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<IgxTreeModule, [typeof IgxTreeSelectMarkerDirective, typeof IgxTreeExpandIndicatorDirective, typeof i1.IgxTreeNodeLinkDirective, typeof IgxTreeComponent, typeof i1.IgxTreeNodeComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.IgxIconModule, typeof i5.IgxInputGroupModule, typeof i6.IgxCheckboxModule, typeof i7.IgxProgressBarModule], [typeof IgxTreeSelectMarkerDirective, typeof IgxTreeExpandIndicatorDirective, typeof i1.IgxTreeNodeLinkDirective, typeof IgxTreeComponent, typeof i1.IgxTreeNodeComponent, typeof i4.IgxIconModule, typeof i5.IgxInputGroupModule, typeof i6.IgxCheckboxModule, typeof i8.IgxExpansionPanelModule]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<IgxTreeModule>;
}
