import type { AuthRole, AuthUser } from '@/modules/auth/types/auth.types'

export interface ImpersonatedUserSummary {
  id: string
  name: string
  email: string
}

export interface ImpersonateSessionPayload {
  data: AuthUser
  active_role: AuthRole | null
  can_switch_role: boolean
  redirect_path: string
}

export interface ImpersonateTakeResponse extends ImpersonateSessionPayload {
  success: boolean
  message: string
  impersonated_user: ImpersonatedUserSummary
}

export interface ImpersonateLeaveResponse extends ImpersonateSessionPayload {
  success: boolean
  message: string
  original_user: ImpersonatedUserSummary
}

export interface ImpersonateStatusResponse {
  is_impersonating: boolean
  impersonated_user?: ImpersonatedUserSummary | null
}
