/**
 * Domain Types: EngagementEvent
 *
 * Pure type/config definitions used by the EngagementEvent entity.
 * Kept in domain/types so domain/entities contains only entity classes.
 */

export const EngagementAction = {
  CLICK_SPONSOR_LOGO: 'click_sponsor_logo',
  CLICK_SPONSOR_URL: 'click_sponsor_url',
  DOWNLOAD_LIVERY_PACK: 'download_livery_pack',
  JOIN_LEAGUE: 'join_league',
  REGISTER_RACE: 'register_race',
  VIEW_STANDINGS: 'view_standings',
  VIEW_SCHEDULE: 'view_schedule',
  SHARE_SOCIAL: 'share_social',
  CONTACT_SPONSOR: 'contact_sponsor',
} as const;

export type EngagementAction = typeof EngagementAction[keyof typeof EngagementAction];

export const EngagementEntityType = {
  LEAGUE: 'league',
  DRIVER: 'driver',
  TEAM: 'team',
  RACE: 'race',
  SPONSOR: 'sponsor',
  SPONSORSHIP: 'sponsorship',
} as const;

export type EngagementEntityType = typeof EngagementEntityType[keyof typeof EngagementEntityType];

export interface EngagementEventProps {
  id: string;
  action: EngagementAction;
  entityType: EngagementEntityType;
  entityId: string;
  actorId?: string;
  actorType: 'anonymous' | 'driver' | 'sponsor';
  sessionId: string;
  metadata?: Record<string, string | number | boolean>;
  timestamp: Date;
}