/** @packageDocumentation * @module UnifiedSelection */ import { Id64Arg } from "@bentley/bentleyjs-core"; import { IModelConnection } from "@bentley/imodeljs-frontend"; import { KeySet, RpcRequestsHandler, SelectionScope, SelectionScopeProps } from "@bentley/presentation-common"; /** * Properties for creating [[SelectionScopesManager]]. * @public */ export interface SelectionScopesManagerProps { /** RPC handler to use for requesting selection scopes */ rpcRequestsHandler: RpcRequestsHandler; /** Provider of active locale to use for localizing scopes */ localeProvider?: () => string | undefined; } /** * A manager that knows available [selection scopes]($docs/learning/presentation/Unified-Selection/Terminology#selection-scope) * and can compute logical selection based on element IDs and selection scope. * * @public */ export declare class SelectionScopesManager { private _rpcRequestsHandler; private _getLocale; private _activeScope; constructor(props: SelectionScopesManagerProps); /** Get active locale */ get activeLocale(): string | undefined; /** The active selection scope or its id */ get activeScope(): SelectionScopeProps | SelectionScope | string | undefined; set activeScope(scope: SelectionScopeProps | SelectionScope | string | undefined); /** * Get available selection scopes. * @param imodel The iModel to get selection scopes for * @param locale Optional locale to use when localizing scopes' label and description */ getSelectionScopes(imodel: IModelConnection, locale?: string): Promise; /** * Computes keys that need to be added to logical selection based on provided selection scope. * @param ids Element IDs to compute selection for * @param scope Selection scope to apply */ computeSelection(imodel: IModelConnection, ids: Id64Arg, scope: SelectionScopeProps | SelectionScope | string): Promise; } /** * Normalizes given scope options and returns [[ComputeSelectionScopeProps]] that can be used for * calculating selection with scope. * * @internal */ export declare function createSelectionScopeProps(scope: SelectionScopeProps | SelectionScope | string | undefined): SelectionScopeProps; /** * Determines the scope id * @param scope Selection scope * @public * @deprecated This is an internal utility that should've never become public. */ export declare function getScopeId(scope: SelectionScope | string | undefined): string; //# sourceMappingURL=SelectionScopesManager.d.ts.map