import type OlInteraction from 'ol/interaction/Interaction.js'; import OlMap from 'ol/Map.js'; export declare const DefaultGroupUid = "olcInteractionGroup"; /** * Manage a virtual group of interaction by setting a group uid in every added interaction. * It can add, remove, find interaction, and toggle the active state of interactions. */ export declare class InteractionGroup { protected readonly map: OlMap; protected virtualGroupUid: string; constructor(map: OlMap, virtualGroupUid?: string); /** * @returns all the interaction of the wanted group. */ getGroupInteractions(): OlInteraction[]; /** * Adds the given interaction (with an uid) to the map. * The interaction can't be in multiple groups at the same time. * @param uid - The uid to associate with the interaction * @param interaction - The interaction to add */ add(uid: string, interaction: OlInteraction): void; /** * Finds an interaction of this group by its uid. * @param uid - The uid of the interaction to find * @returns The interaction if found, null otherwise */ find(uid: string): OlInteraction | null; /** * Finds all interaction of this group having their uid starting by the provided prefix. * @param uidPrefix - A start part uid of the interaction to find. * @returns The interactions if found or an empty array otherwise. */ filterStartsWith(uidPrefix: string): OlInteraction[]; /** * Removes the given interaction from the map. * @param uid - The uid of the interaction to remove */ remove(uid: string): void; /** * Verifies if the interaction is already present in the map * @param uid The uid of the interaction to check * @returns boolean indicating if the interaction is present */ hasInteraction(uid: string): boolean; /** * Activate the interaction (and deactivate other interactions of this group) or * deactivate it. */ setActive(active: boolean, uid: string): void; /** * Deactivate all draw interaction of this group. */ deactivateAll(): void; /** * Deactivates and remove every interaction of this group. */ destroy(): void; /** * Deactivate all interaction of this group and activate the given one. * @protected */ protected use(interaction: OlInteraction): void; }