import type { ComponentType } from 'react'

/**
 * Shape every auth provider file exports.
 *
 * Providers are shadcn-style: copy from `providers/*.ts.inactive` into an
 * active `.ts` file and register in `auth.config.ts`. Backend OAuth routes
 * live in `@germantax/functions/src/auth/*`.
 */
export interface AuthProvider {
  id: 'auth0' | 'email' | 'github' | 'google' | 'microsoft' | 'passwordless'
  labelKey: string
  Icon: ComponentType<{ size?: number | string }>
  /** Variant tone used for provider button treatment. */
  tone: 'primary' | 'secondary' | 'default'
  /** Required env var names — surfaced by the console's auth browser. */
  envVars: string[]
  /** Kicks off the login flow. May redirect (OAuth) or open a modal (email). */
  login(): Promise<void> | void
}
