/**
 * The raw invitation link is a password-setup credential for another person.
 * It is returned to the inviting admin only as a development fallback, when the
 * email could not be delivered and the API is not running in production.
 */
export function inviteDeliveryResult(emailSent: boolean, inviteLink: string): { emailSent: boolean; inviteLink?: string } {
  if (emailSent || process.env.NODE_ENV === 'production') {
    return { emailSent };
  }
  return { emailSent, inviteLink };
}
