/**
 * Funnel Analytics Types
 *
 * Type definitions for registration funnel tracking events.
 * Tracks user journey from visit through conversion.
 */

export type FunnelEvent =
  | 'visit'
  | 'registration'
  | 'profile_complete'
  | 'first_content'
  | 'subscribe'
  | 'purchase'
  | 'repeat_purchase';

export type RegistrationType = 'focused' | 'generic' | 'landing-modal';

export interface FunnelEventPayload {
  event: FunnelEvent;
  route: string;
  sessionId: string;
  timestamp: string;
  userId?: string;
  audience?: 'worker' | 'client' | null;
  userType?: string;
  registrationPath?: string;
  registrationType?: RegistrationType;
  entryReferrer?: string;
  referrer?: string;
}

export interface FunnelContext {
  audience?: 'worker' | 'client' | null;
  userType?: string;
}

export interface SignupContext extends FunnelContext {
  registrationPath?: string;
  registrationType?: RegistrationType;
}

export interface UseFunnelEventsConfig {
  userId?: string;
  audience?: 'worker' | 'client' | null;
  userType?: string;
  autoTrackVisits?: boolean;
}
