import type { MapData } from '@mappedin/mappedin-js'; /** * Events that contain map data objects that can be hydrated. * Currently supports click and hover events which contain spaces, objects, etc. */ export declare const HYDRATABLE_EVENTS: Set<"click" | "hover">; /** Serialized map data object with optional id */ type SerializedItem = { id?: string; } & Record; /** * Hydrates an array of serialized map data objects to full instances. * Uses mapData.getById to retrieve the full object with all properties. * * @param mapData - The MapData instance to hydrate from * @param type - The type of object to hydrate ('space', 'object', etc.) * @param items - Array of serialized objects with at least an 'id' property * @returns Array of hydrated objects, falls back to original if not found */ export declare function hydrateMapDataArray(mapData: MapData, type: 'space' | 'object' | 'area' | 'floor' | 'facade', items: SerializedItem[] | undefined): T[]; /** * Hydrates an event payload by replacing serialized map data objects with * full instances from mapData. This restores properties like externalId, * enterpriseLocations, doors, etc. that are not included in toJSON(). * * @param mapData - The MapData instance to hydrate from * @param eventName - The name of the event * @param payload - The serialized event payload from WebView * @returns Hydrated payload with full map data object instances * * @example * ```typescript * const hydratedPayload = hydrateEventPayload(mapData, 'click', serializedPayload); * // Now hydratedPayload.spaces[0].externalId is available * ``` */ export declare function hydrateEventPayload(mapData: MapData | null, eventName: string, payload: T): T; export {}; //# sourceMappingURL=event-hydration.d.ts.map