/** @packageDocumentation
 * @module IModelComponents
 */
import { TreeNodeItem } from "@itwin/components-react";
import { BeEvent, Id64String } from "@itwin/core-bentley";
import { IModelConnection, Viewport } from "@itwin/core-frontend";
import { ECClassGroupingNodeKey, NodeKey } from "@itwin/presentation-common";
import { IFilteredPresentationTreeDataProvider, IPresentationTreeDataProvider } from "@itwin/presentation-components";
import { IVisibilityHandler, VisibilityChangeListener, VisibilityStatus } from "../VisibilityTreeEventHandler";
/**
 * Visibility tree node types.
 * @beta
 * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
 */
export declare enum ModelsTreeNodeType {
    Unknown = 0,
    Subject = 1,
    Model = 2,
    Category = 3,
    Element = 4,
    Grouping = 5
}
/**
 * Type definition of predicate used to decide if node can be selected
 * @beta
 * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
 */
export declare type ModelsTreeSelectionPredicate = (key: NodeKey, type: ModelsTreeNodeType) => boolean;
/**
 * Props for [[ModelsVisibilityHandler]]
 * @alpha
 */
export interface ModelsVisibilityHandlerProps {
    rulesetId: string;
    viewport: Viewport;
    hierarchyAutoUpdateEnabled?: boolean;
    /** @internal */
    subjectModelIdsCache?: SubjectModelIdsCache;
}
/**
 * Visibility handler used by [[ModelsTree]] to control visibility of the tree items.
 * @alpha
 * @deprecated in 3.6. Was moved to `@itwin/tree-widget-react` package.
 */
export declare class ModelsVisibilityHandler implements IVisibilityHandler {
    private _props;
    private _pendingVisibilityChange;
    private _subjectModelIdsCache;
    private _filteredDataProvider?;
    private _elementIdsCache;
    private _listeners;
    constructor(props: ModelsVisibilityHandlerProps);
    dispose(): void;
    onVisibilityChange: BeEvent<VisibilityChangeListener>;
    /** Sets data provider that is used to get filtered tree hierarchy. */
    setFilteredDataProvider(provider: IFilteredPresentationTreeDataProvider | undefined): void;
    static getNodeType(item: TreeNodeItem, dataProvider: IPresentationTreeDataProvider): ModelsTreeNodeType;
    static isSubjectNode(node: TreeNodeItem): any;
    static isModelNode(node: TreeNodeItem): any;
    static isCategoryNode(node: TreeNodeItem): any;
    /** Returns visibility status of the tree node. */
    getVisibilityStatus(node: TreeNodeItem, nodeKey: NodeKey): VisibilityStatus | Promise<VisibilityStatus>;
    /** Changes visibility of the items represented by the tree node. */
    changeVisibility(node: TreeNodeItem, nodeKey: NodeKey, on: boolean): Promise<void>;
    protected getSubjectNodeVisibility(ids: Id64String[], node: TreeNodeItem): Promise<VisibilityStatus>;
    private getSubjectDisplayStatus;
    private getFilteredSubjectDisplayStatus;
    protected getModelDisplayStatus(id: Id64String): VisibilityStatus;
    protected getCategoryDisplayStatus(id: Id64String, parentModelId: Id64String | undefined): VisibilityStatus;
    protected getElementGroupingNodeDisplayStatus(_id: string, key: ECClassGroupingNodeKey): Promise<VisibilityStatus>;
    protected getElementDisplayStatus(elementId: Id64String, modelId: Id64String | undefined, categoryId: Id64String | undefined): VisibilityStatus;
    protected changeSubjectNodeState(ids: Id64String[], node: TreeNodeItem, on: boolean): Promise<void | void[]>;
    private changeFilteredSubjectState;
    private changeSubjectState;
    protected changeModelState(id: Id64String, on: boolean): Promise<void>;
    protected changeModelsVisibility(ids: Id64String[], visible: boolean): Promise<void>;
    protected changeCategoryState(categoryId: Id64String, parentModelId: Id64String | undefined, on: boolean): void;
    protected changeElementGroupingNodeState(key: ECClassGroupingNodeKey, on: boolean): Promise<void>;
    protected changeElementState(id: Id64String, modelId: Id64String | undefined, categoryId: Id64String | undefined, on: boolean): Promise<void>;
    protected changeElementsState(modelId: Id64String | undefined, categoryId: Id64String | undefined, elementIds: AsyncGenerator<Id64String>, on: boolean): Promise<void>;
    private onVisibilityChangeInternal;
    private onViewChanged;
    private onElementAlwaysDrawnChanged;
    private onElementNeverDrawnChanged;
    private getCategoryParentModelId;
    private getElementModelId;
    private getElementCategoryId;
    private getSubjectModelIds;
    private getAssemblyElementIds;
    private getGroupedElementIds;
}
/** @internal */
export declare class SubjectModelIdsCache {
    private _imodel;
    private _subjectsHierarchy;
    private _subjectModels;
    private _init;
    constructor(imodel: IModelConnection);
    private initSubjectModels;
    private initCache;
    private appendSubjectModelsRecursively;
    getSubjectModelIds(subjectId: Id64String): Promise<Id64String[]>;
}
//# sourceMappingURL=ModelsVisibilityHandler.d.ts.map