import type { LiteralUnion } from 'type-fest';

export interface LoginEvent {
  action: 'loginSuccess' | 'loginFailed';
  provider: LiteralUnion<'wallet' | 'apple' | 'github' | 'google' | 'email' | 'twitter' | 'passkey', string>;
  success: boolean;
}

export interface LoginSuccessEvent extends LoginEvent {
  action: 'loginSuccess';
  success: true;
}

export interface LoginFailedEvent extends LoginEvent {
  action: 'loginFailed';
  success: false;
  errorMessage: string;
}
