import { EventEmitter, Injector, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
import { Params, QueryParamsHandling } from '@angular/router';
import { Subject } from 'rxjs';
import { LinkItem } from '../../controls/navigation/link-item';
import { TelemetryService } from '../../core/telemetry.service';
import { ViewStatus } from '../../shared/display';
import * as i0 from "@angular/core";
export declare class HierarchyItem implements LinkItem {
    id: string;
    /** Label to display for the item */
    label: string;
    /** Text to be displayed in the item's tooltip. When not provided, the label will be displayed. */
    tooltip?: string;
    /** Text to be displayed in the item's icon tooltip. */
    iconTooltip?: string;
    /** Indicates how many levels deep the item is in the parent structure */
    level: number;
    url?: string;
    queryParams?: Params | null;
    queryParamsHandling?: QueryParamsHandling;
    icon?: string;
    /** Display item as a link, a heading, or with a divider line below it */
    display?: 'default' | 'heading' | 'divider';
    /** Set to hide toggle, even if item has children */
    hideToggle?: boolean;
    /** Flag to indicate whether the item has children or not, mostly drives
     *  whether you get the expand/collapse button
     */
    hasChildren: boolean;
    /** Array of children if any for the item */
    children: Array<HierarchyItem>;
    /** Flag to indicate if the item has been expanded */
    expanded?: boolean;
    /** Flag to indicate if the item is selected */
    selected?: boolean;
    /** Flag to indicate if the item can be selected */
    selectable?: boolean;
    readonly?: boolean;
    /** Status of each item to indicate whether children lookup is pending or
     *  if an error occurred retrieving data
     */
    status?: ViewStatus;
    /** Indicates if the item is a top level entity, e.g. Organization or Cost Center */
    topLevel?: boolean;
    /**
     * When checking the url for activeness, the url must match exactly or partially
     * @see https://angular.io/guide/router#active-router-links
     */
    isActiveExactMatch?: boolean;
    /**
     * Reference to the parent item. Useful if you need to walk the tree in reverse. An example usage
     * would be to expand all parent items above a node that is the current selection.
     */
    parentItem?: HierarchyItem;
    /**
     * Set to have no level indentation for the item. Useful for top level items in a tree that is not hierarchical
     */
    noIndent?: boolean | undefined;
}
/**
 * Represents a HierarchyItem that has been clicked to toggle its expansion state.
 */
export type ToggledHierarchyItem = {
    item: HierarchyItem;
    expanded: boolean;
};
export declare abstract class HierarchyBase implements OnChanges, OnDestroy {
    /** First item to start the hierarchy structure */
    rootNode: HierarchyItem;
    /** Event emitter to request children for a given item */
    getItemChildren: EventEmitter<HierarchyItem>;
    /** Event emitted when an item is toggled. */
    itemToggled: EventEmitter<ToggledHierarchyItem>;
    /**
    * Used to unsubscribe from observables
    */
    private _destroyed;
    get destroyed(): Subject<void>;
    protected telemetryService: TelemetryService;
    constructor(injector: Injector);
    ngOnChanges(changes: SimpleChanges): void;
    /**
    * Function called when the component is destroyed
    */
    ngOnDestroy(): void;
    /** Handler for the toggle button */
    toggleItemClicked(item: HierarchyItem, expanded: boolean): void;
    /** Method exposed to the parent component to set the items children once they are available
     */
    setItemChildren(parentItem: HierarchyItem, items: Array<HierarchyItem>): void;
    /** Method exposed to the parent component to indicate that something happened on the
     *  item that caused an error, could be retrieving children
    */
    setItemError(parentItem: HierarchyItem): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<HierarchyBase, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<HierarchyBase, never, never, { "rootNode": { "alias": "rootNode"; "required": false; }; }, { "getItemChildren": "getItemChildren"; "itemToggled": "itemToggled"; }, never, never, false, never>;
}
