package com.adealink.weparty.account.login.data

import android.os.Parcelable
import com.adealink.weparty.module.account.AccountLocalService
import com.adealink.weparty.module.profile.data.UserInfo
import com.google.gson.annotations.Must
import com.google.gson.annotations.SerializedName
import kotlinx.parcelize.Parcelize

enum class ThirdType(val value: String) {
    GOOGLE("google"),
    PHONE("phone"),
    EMAIL("mail"),
}

data class GoogleLoginReq(
    @SerializedName("data") val token: String,
)

data class TestLoginReq(
    @SerializedName("email") val email: String = AccountLocalService.testAccount,
)

@Parcelize
data class LoginResult(
    @SerializedName("token") val token: String,
    @SerializedName("refreshToken") val refreshToken: String,
    @SerializedName("userProfile") val userInfo: UserInfo,
    @SerializedName("reason") val reason: String,
    @SerializedName("expire") val expire: Long,
) : Parcelable

data class UserKickOutNotify(
    @SerializedName("roomId") val roomId: Long,
    @Must
    @SerializedName("kickUid") val kickUid: String,
    @Must
    @SerializedName("kickReason") val kickReason: Long,
)


enum class VerifyCodeType(val value: Int) {
    SMS(0),
    WHATSAPP(1),
}


@Parcelize
data class EmailCodeResult(
    @SerializedName("seqId") val seqId: Long,
    @SerializedName("mailAccount") val mailAccount: String,
    @SerializedName("verifyCode") val verifyCode: String,
    @SerializedName("tempToken") val tempToken: String,
) : Parcelable

enum class EmailType(val type: Int) {
    FRAGMENT_BIND_FIRST(1),
    FRAGMENT_BIND_SECOND(2),
}

enum class BindState(val state: Int) {
    EMAIL_BIND(1),
    EMAIL_UNBIND(2)
}

enum class EmailClickType(val type: Int) {
    CALLBACK_CLICK(1),
    CALLBACK_CONFIRM(2)
}

@Parcelize
data class ThirdAccountListData(
    @SerializedName("tid") val tid: Long,
    @SerializedName("userInfo") val userInfo: UserInfo,
    @SerializedName("latestLoginTs") val latestLoginTs: Long,
) : Parcelable


enum class EmailReason(val reason: Int) {
    BIND_EMAIL(0),
    RESET_PWD(1),
    GOOGLE_LOGIN(2)
}

data class RandomProfile(
    @SerializedName("male") val male: RandomProfileData,
    @SerializedName("female") val female: RandomProfileData,
)

data class RandomProfileData(
    @SerializedName("nicknames") val nicknames: List<String>,
    @SerializedName("avatars") val avatars: List<String>,
)