export const registrationResponses = {
  init: {
    email: {
      success: true,
      process_token: 'pt_reg_123',
      status: 'pending_otp',
      otp_method: 'email',
      otp_sent_to: 'al***@domain.com',
      otp_expires_in: 300,
      email_sent: true,
    },
    phone: {
      success: true,
      process_token: 'pt_reg_124',
      status: 'pending_otp',
      otp_method: 'sms',
      otp_sent_to: '+221 ****567',
      otp_expires_in: 300,
      sms_sent: true,
    },
    errors: {
      validation_error: {
        success: false,
        error_type: 'validation_error',
        message: 'Donnees invalides',
      },
      invalid_country_code: {
        success: false,
        error_type: 'invalid_country_code',
        message: "L'inscription par telephone est reservee aux numeros senegalais (+221)",
      },
      invalid_app: {
        success: false,
        error_type: 'invalid_app',
        message: 'Application non trouvee',
      },
      email_exists: {
        success: false,
        error_type: 'email_exists',
        message: 'Cet email est deja utilise',
        conflict: {
          type: 'email',
          masked_identifier: 'al***@domain.com',
          options: {
            can_login: true,
            can_recover_by_email: true,
            can_recover_by_sms: false,
            masked_email: 'al***@domain.com',
          },
        },
      },
      phone_exists: {
        success: false,
        error_type: 'phone_exists',
        message: 'Ce numero est deja utilise',
        conflict: {
          type: 'phone',
          masked_identifier: '+221 ****567',
          options: {
            can_login: true,
            can_recover_by_email: true,
            can_recover_by_sms: true,
            masked_phone: '+221 ****567',
            masked_email: 'al***@domain.com',
          },
        },
      },
    },
  },

  verifyOtp: {
    email: {
      success: true,
      status: 'pending_registration',
      message: 'Code verifie, veuillez definir votre mot de passe',
    },
    phone: {
      success: true,
      status: 'completed',
      callback_token: 'ct_reg_123',
      expires_at: '2026-06-08T12:45:00Z',
      message: 'Inscription finalisee avec succes',
      user: {
        reference: 'usr_xxx',
        name: 'Alioune Diop',
        phone: '+221 ****567',
      },
    },
    errors: {
      invalid_token: {
        success: false,
        error_type: 'invalid_token',
        message: 'Session expiree ou invalide',
      },
      invalid_type: {
        success: false,
        error_type: 'invalid_type',
        message: 'Session invalide pour cette action',
      },
      invalid_status: {
        success: false,
        error_type: 'invalid_status',
        message: "Cette session n'est pas en attente de verification OTP",
      },
      invalid_otp: {
        success: false,
        error_type: 'invalid_otp',
        message: 'Code incorrect',
        remaining_attempts: 2,
      },
    },
  },

  complete: {
    success: {
      success: true,
      callback_token: 'ct_reg_124',
      expires_at: '2026-06-08T12:45:00Z',
    },
    errors: {
      invalid_token: {
        success: false,
        error_type: 'invalid_token',
        message: 'Session expiree ou invalide',
      },
      invalid_type: {
        success: false,
        error_type: 'invalid_type',
        message: 'Session invalide pour cette action',
      },
      invalid_status: {
        success: false,
        error_type: 'invalid_status',
        message: "Veuillez d'abord verifier votre code OTP",
      },
      missing_data: {
        success: false,
        error_type: 'missing_data',
        message: "Donnees d'inscription manquantes",
      },
    },
  },

  resendOtp: {
    success: {
      success: true,
      message: 'Code renvoye',
      sent: true,
      otp_method: 'email',
      otp_sent_to: 'al***@domain.com',
      otp_expires_in: 300,
      cooldown_remaining: 60,
    },
    errors: {
      invalid_token: {
        success: false,
        error_type: 'invalid_token',
        message: 'Session expiree ou invalide',
      },
      invalid_type: {
        success: false,
        error_type: 'invalid_type',
        message: 'Session invalide pour cette action',
      },
      resend_cooldown: {
        success: false,
        error_type: 'resend_cooldown',
        message: 'Veuillez patienter avant de renvoyer',
        wait_seconds: 60,
      },
      missing_data: {
        success: false,
        error_type: 'missing_data',
        message: "Donnees d'inscription manquantes",
      },
    },
  },

  completePhoneOnly: {
    success: {
      success: true,
      status: 'completed',
      callback_token: 'ct_reg_125',
      expires_at: '2026-06-08T12:45:00Z',
      message: 'Inscription finalisee avec succes',
      user: {
        reference: 'usr_xxx',
        name: 'Alioune Diop',
        phone: '+221 ****567',
      },
    },
    errors: {
      invalid_token: {
        success: false,
        error_type: 'invalid_token',
        message: 'Session expiree ou invalide',
      },
      invalid_type: {
        success: false,
        error_type: 'invalid_type',
        message: 'Session invalide pour cette action',
      },
      invalid_status: {
        success: false,
        error_type: 'invalid_status',
        message: "Veuillez d'abord verifier votre code OTP",
      },
      missing_data: {
        success: false,
        error_type: 'missing_data',
        message: "Donnees d'inscription manquantes",
      },
      invalid_registration_type: {
        success: false,
        error_type: 'invalid_registration_type',
        message: 'Cette methode est reservee aux inscriptions phone-only',
      },
    },
  },
} as const;
