import React from "react";
type Props<E> = {
    children: React.ReactNode;
    onTrack: (event: E) => void;
};
/**
 * A factory function that creates a provider and a hook to track events inside a feature component.
 * @typedef createEventTrackerReturn
 * @property {EventsProvider} A provider that should wrap the feature component.
 * @property {useTrackEvent} A hook that should be used inside the feature component to track events.
 *
* @returns {createEventTrackerReturn}
 * @example <caption>Usage:</caption>
 * type Events = { key: "step_goal_seen" } | { key: "step_connect_seen" };
 *
 * const { EventsProvider, useTrackEvent } = createEventTracker<Events>("ParentComponent");
 *
 * function ParentComponent() {
 *   const onTrackEvent = (event) => {
 *   console.log(event);
 *   };
 *
 *   return (
 *   <EventsProvider onTrack={onTrackEvent}>
 *   <ChildComponent />
 *   </EventsProvider>
 *   );
 * };
 *
 * function ChildComponent() {
 * const trackEvent = useTrackEvent();
 *
 * return <button onClick={() => trackEvent({ key: "step_goal_seen" })}>Click me</button>;
 * }
 *
 */
export declare function createEventTracker<E extends unknown>(name: string): {
    EventsProvider: (props: Props<E>) => JSX.Element;
    useTrackEvent: () => (event: E) => void;
};
export {};
