import { NodeAppearance } from './NodeAppearance'; import { NodeCollection } from './NodeCollection'; import { PrioritizedArea } from './prioritized/types'; import { IndexSet } from '../../utilities'; /** * Delegate for applying styles in {@see NodeStyleProvider}. * @param treeIndices Set of tree indices that the style is applied to. * @param appearance Style to be applied to the nodes. */ export type ApplyStyleDelegate = (treeIndices: IndexSet, appearance: NodeAppearance) => void; export declare class NodeAppearanceProvider { private _styledCollections; private _lastFiredLoadingState?; private _cachedPrioritizedAreas?; private readonly _events; on(event: 'changed', listener: () => void): void; on(event: 'loadingStateChanged', listener: (isLoading: boolean) => void): void; on(event: 'prioritizedAreasChanged', listener: () => void): void; off(event: 'changed', listener: () => void): void; off(event: 'loadingStateChanged', listener: (isLoading: boolean) => void): void; assignStyledNodeCollection(nodeCollection: NodeCollection, appearance: NodeAppearance, importance?: number): void; unassignStyledNodeCollection(nodeCollection: NodeCollection): void; applyStyles(applyCb: ApplyStyleDelegate): void; getPrioritizedAreas(): PrioritizedArea[]; clear(): void; get isLoading(): boolean; dispose(): void; private notifyChanged; /** * Schedules event 'changed' to trigger at the next tick. */ private readonly scheduleNotifyChanged; private notifyLoadingStateChanged; private handleNodeCollectionChanged; private notifyPrioritizedAreasChanged; }