import { CollectionViewer, DataSource, SelectionChange } from '@angular/cdk/collections';
import { FormControl } from '@angular/forms';
import { FlatTreeControl } from '@angular/cdk/tree';
import { NgmDSCoreService } from '@metad/ocap-angular/core';
import { Dimension, EntityProperty, EntityType, IDimensionMember, TreeNodeInterface } from '@metad/ocap-core';
import { TranslateService } from '@ngx-translate/core';
import { BehaviorSubject, Observable } from 'rxjs';
import { EntityCapacity, EntitySchemaType } from './types';
export interface EntitySchemaNode extends EntityProperty {
    type?: EntitySchemaType;
}
/** Flat node with expandable and level information */
export declare class EntitySchemaFlatNode {
    item: EntitySchemaNode;
    level: number;
    expandable: boolean;
    isLoading: boolean;
    children: any;
    error: any;
    constructor(item: EntitySchemaNode, level?: number, expandable?: boolean, isLoading?: boolean, children?: any, error?: any);
}
export declare class EntitySchemaDataSource implements DataSource<EntitySchemaFlatNode> {
    private _treeControl;
    private dsCoreService;
    private translateService;
    private capacities;
    private destroy$;
    dataChange: BehaviorSubject<EntitySchemaFlatNode[]>;
    searchControl: FormControl<any>;
    get dataSourceName(): string;
    set dataSourceName(value: string);
    private dataSourceName$;
    private dataSource$;
    private entity$;
    private entityService$;
    get data(): EntitySchemaFlatNode[];
    set data(value: EntitySchemaFlatNode[]);
    private entityType;
    constructor(_treeControl: FlatTreeControl<EntitySchemaFlatNode>, dsCoreService: NgmDSCoreService, translateService: TranslateService, capacities: EntityCapacity[]);
    connect(collectionViewer: CollectionViewer): Observable<EntitySchemaFlatNode[]>;
    disconnect(collectionViewer: CollectionViewer): void;
    /** Handle expand/collapse behaviors */
    handleTreeControl(change: SelectionChange<EntitySchemaFlatNode>): void;
    /**
     * Toggle the node, remove from display list
     */
    toggleNode(node: EntitySchemaFlatNode, expand: boolean): void;
    getChildren(node: EntitySchemaFlatNode): Observable<any[]>;
    selectDimensionMembers(dimension: Dimension, startLevel?: number): Observable<{
        type: EntitySchemaType;
        name: string;
        key: string;
        caption: string;
        label?: string;
        title?: string;
        raw: IDimensionMember;
        value?: number;
        level?: number;
        expand?: boolean;
        children?: TreeNodeInterface<IDimensionMember>[];
        parent?: TreeNodeInterface<IDimensionMember>;
        isLeaf?: boolean;
    }[]>;
    getEntityTypeChildren(entityType: EntityType): any[];
    hasCapability(capability: EntityCapacity): boolean;
    getTranslation(key: string, params?: any): any;
}
