export type SocialProvider = 'google' | 'microsoft' | 'apple';

export interface LoginFormProps {
  /** Called when user submits email/password. */
  onSubmit: (email: string, password: string) => void;
  /** Social providers to display. */
  providers?: SocialProvider[];
  /** Called when user clicks a social login button. */
  onSocialLogin?: (provider: SocialProvider) => void;
  /** Whether the form is currently loading. */
  isLoading?: boolean;
  /** Error message to display. */
  error?: string | null;
  /** Additional CSS class for the root element. */
  className?: string;
}

export interface MfaChallengeProps {
  /** Called when user submits the MFA code. */
  onSubmit: (code: string) => void;
  /** Called when user clicks "Use recovery code". */
  onUseRecovery?: () => void;
  /** MFA methods available. */
  methods?: string[];
  /** Whether the form is currently loading. */
  isLoading?: boolean;
  /** Error message to display. */
  error?: string | null;
  /** Additional CSS class for the root element. */
  className?: string;
}

export interface SocialButtonsProps {
  /** Providers to display buttons for. */
  providers: SocialProvider[];
  /** Called when a provider button is clicked. */
  onSelect: (provider: SocialProvider) => void;
  /** Whether the buttons are disabled. */
  disabled?: boolean;
  /** Additional CSS class for the root element. */
  className?: string;
}

export interface RegisterFormProps {
  /** Called when user submits registration. */
  onSubmit: (data: { name: string; email: string; password: string }) => void;
  /** Whether the form is currently loading. */
  isLoading?: boolean;
  /** Error message to display. */
  error?: string | null;
  /** Terms of service URL (renders checkbox if provided). */
  termsUrl?: string;
  /** Privacy policy URL. */
  privacyUrl?: string;
  /** Called when user clicks "Already have an account?" */
  onSwitchToLogin?: () => void;
  /** Additional CSS class for the root element. */
  className?: string;
}

export interface ForgotPasswordFormProps {
  /** Called when user submits email for password reset. */
  onSubmit: (email: string) => void;
  /** Whether the form is currently loading. */
  isLoading?: boolean;
  /** Error message to display. */
  error?: string | null;
  /** Success message (e.g., "Check your email"). */
  success?: string | null;
  /** Called when user clicks "Back to login". */
  onBack?: () => void;
  /** Additional CSS class for the root element. */
  className?: string;
}

export interface ResetPasswordFormProps {
  /** Called when user submits new password. */
  onSubmit: (password: string) => void;
  /** Whether the form is currently loading. */
  isLoading?: boolean;
  /** Error message to display. */
  error?: string | null;
  /** Success message (e.g., "Password updated"). */
  success?: string | null;
  /** Additional CSS class for the root element. */
  className?: string;
}

export interface VerifyEmailFormProps {
  /** Called when user submits the verification code. */
  onSubmit: (code: string) => void;
  /** Called when user clicks "Resend code". */
  onResend?: () => void;
  /** Whether the form is currently loading. */
  isLoading?: boolean;
  /** Error message to display. */
  error?: string | null;
  /** Success message (e.g., "Code resent"). */
  success?: string | null;
  /** Email address being verified (for display). */
  email?: string;
  /** Additional CSS class for the root element. */
  className?: string;
}

export interface OnboardingStep {
  /** Unique key for the step. */
  key: string;
  /** Display label for the step indicator. */
  label: string;
}

export interface OnboardingShellProps {
  /** Ordered list of steps. */
  steps: OnboardingStep[];
  /** Index of the current step (0-based). */
  currentStep: number;
  /** Called when user clicks Next. */
  onNext: () => void;
  /** Called when user clicks Back. */
  onBack: () => void;
  /** Called when the final step completes. */
  onComplete: () => void;
  /** Content to render for the current step. */
  children: React.ReactNode;
  /** Additional CSS class for the root element. */
  className?: string;
}

export interface AuthPageLayoutProps {
  /** Product name displayed at the top. */
  productName: string;
  /** Optional logo element or URL. */
  logo?: React.ReactNode;
  /** Page title (e.g., "Sign In", "Create Account"). */
  title: string;
  /** Subtitle or description. */
  subtitle?: string;
  /** Form content. */
  children: React.ReactNode;
  /** Footer content (links, etc.). */
  footer?: React.ReactNode;
  /** Additional CSS class for the root element. */
  className?: string;
}

export type PasswordStrength = 'weak' | 'fair' | 'good' | 'strong';
