import { atom } from 'jotai';
import { TrackEventParams } from 'src/services/amplitudeService/amplitudeService';

// This atom will hold the trackEvent function from the Amplitude context.
// It needs to be initialized by a React component that has access to the useAmplitude hook.
export const amplitudeTrackEventAtom = atom<((params: TrackEventParams) => Promise<void>) | null>(
  null,
);
