import React from 'react'; import type { LinkPickerProps } from '../types'; import type { LinkPickerAnalyticsContextType } from '../utils/analytics/analytics.codegen'; type AnalyticsContextAttributesType = LinkPickerAnalyticsContextType; export type TrackAttribute = (attribute: K, value: AnalyticsContextAttributesType[K]) => void; interface AnalyticsContextType { /** * Update a single attribute in the analytics context */ trackAttribute: TrackAttribute; /** * Update a set of attributes in the analytics context */ trackAttributes: (attributes: Partial) => void; /** * Retrieve the current set of attributes * Can be used by components to derive/compute new attributes for specific events */ getAttributes: () => LinkPickerAnalyticsContextType; } type LinkPickerAnalyticsProps = Pick; /** * Hook that exposes the context-level attribute getters and setters. */ export declare const useLinkPickerAnalytics: () => AnalyticsContextType; /** * Wraps a component with the analytics context + listener to update events with contextual-level attributes. * Should be implemented once at the root of the link picker. */ export declare function withLinkPickerAnalyticsContext

(WrappedComponent: React.ComponentType

): React.ComponentType

; export {};