import { FlatTreeControl } from '@angular/cdk/tree';
import { EventEmitter } from '@angular/core';
import { ControlValueAccessor, FormControl } from '@angular/forms';
import { MatCheckboxChange } from '@angular/material/checkbox';
import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
import { NgmAppearance } from '@metad/ocap-angular/core';
import { DataSettings, Dimension, DisplayBehaviour, FilterSelectionType, FlatTreeNode, IDimensionMember, ISlicer, PrimitiveType, TreeNodeInterface, TreeSelectionMode } from '@metad/ocap-core';
import { NgmSmartFilterService } from '../smart-filter.service';
import { TreeControlOptions } from '../types';
import * as i0 from "@angular/core";
export interface TreeItemFlatNode<T> extends FlatTreeNode<T> {
    checked?: boolean;
}
export declare class NgmMemberTreeComponent<T extends IDimensionMember = IDimensionMember> implements ControlValueAccessor {
    private smartFilterService;
    _isMemberTreeComponent: boolean;
    readonly dataSettings: import("@angular/core").InputSignal<DataSettings>;
    readonly dimension: import("@angular/core").InputSignal<Dimension>;
    readonly options: import("@angular/core").InputSignal<TreeControlOptions>;
    get displayBehaviour(): DisplayBehaviour;
    get treeSelectionMode(): TreeSelectionMode;
    readonly appearance: import("@angular/core").InputSignal<NgmAppearance>;
    readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, string | boolean>;
    readonly _disabled: import("@angular/core").WritableSignal<boolean>;
    loadingChanging: EventEmitter<boolean>;
    onChange: (input: any) => void;
    itemSize: number;
    treeNodePaddingIndent: number;
    unfold: boolean;
    searchControl: FormControl<any>;
    /** Map from nested node to flattened node. This helps us to keep the same object for selection */
    nestedNodeMap: Map<TreeNodeInterface<T>, TreeItemFlatNode<T>>;
    keyNodeMap: Map<PrimitiveType, TreeItemFlatNode<T>>;
    treeControl: FlatTreeControl<TreeItemFlatNode<T>>;
    treeFlattener: MatTreeFlattener<TreeNodeInterface<T>, TreeItemFlatNode<T>>;
    dataSource: MatTreeFlatDataSource<TreeNodeInterface<T>, TreeItemFlatNode<T>>;
    /** The selection for checklist */
    readonly memberKeys: import("@angular/core").WritableSignal<string[]>;
    readonly options$: import("rxjs").Observable<TreeControlOptions>;
    readonly onlyLeaves$: import("rxjs").Observable<boolean>;
    readonly loading$: import("rxjs").BehaviorSubject<boolean>;
    readonly error: import("@angular/core").WritableSignal<string>;
    readonly slicer: import("@angular/core").Signal<ISlicer>;
    readonly treeNodes: import("@angular/core").Signal<TreeNodeInterface<IDimensionMember>[]>;
    readonly autoActiveFirst: import("@angular/core").Signal<boolean>;
    readonly selectionType: import("@angular/core").Signal<FilterSelectionType>;
    readonly isSingleRange: import("@angular/core").Signal<boolean>;
    readonly initial: import("@angular/core").WritableSignal<boolean>;
    /**
    |--------------------------------------------------------------------------
    | Effects
    |--------------------------------------------------------------------------
    */
    readonly loadedTreeNodes: import("@angular/core").EffectRef;
    readonly autoActiveFirstEffect: import("@angular/core").EffectRef;
    private _membersSub;
    private _refreshSub;
    private _loadingSub;
    private errorSub;
    constructor(smartFilterService: NgmSmartFilterService);
    writeValue(obj: any): void;
    registerOnChange(fn: any): void;
    registerOnTouched(fn: any): void;
    setDisabledState?(isDisabled: boolean): void;
    refresh(force?: boolean): void;
    /**
     * Transformer to convert nested node to flat node. Record the nodes in maps for later use.
     */
    transformer: (node: TreeNodeInterface<T>, level: number) => TreeItemFlatNode<T>;
    getLevel: (node: TreeItemFlatNode<T>) => number;
    isExpandable: (node: TreeItemFlatNode<T>) => boolean;
    getChildren: (node: TreeNodeInterface<any>) => TreeNodeInterface<any>[];
    /** Whether all the descendants of the node are selected. */
    descendantsAllSelected(node: TreeItemFlatNode<T>): boolean;
    /** Whether part of the descendants are selected */
    descendantsPartiallySelected(node: TreeItemFlatNode<T>): boolean;
    childrenAllSelected(node: TreeItemFlatNode<T>): boolean;
    childrenPartiallySelected(node: TreeItemFlatNode<T>): boolean;
    isPartiallySelected(node: TreeItemFlatNode<T>): boolean;
    isSelected(item: T): boolean;
    toggleMemberKey(key: string): void;
    selectMembers(...keys: string[]): void;
    deselectMembers(...keys: string[]): void;
    itemSelectionToggle(node: TreeItemFlatNode<T>, event: MatCheckboxChange): void;
    toggleExpand(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<NgmMemberTreeComponent<any>, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<NgmMemberTreeComponent<any>, "ngm-member-tree", never, { "dataSettings": { "alias": "dataSettings"; "required": false; "isSignal": true; }; "dimension": { "alias": "dimension"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "loadingChanging": "loadingChanging"; }, never, never, true, never>;
}
