package com.adealink.weparty.account.register.viewmodel

import androidx.lifecycle.MutableLiveData
import com.adealink.frame.mvvm.livedata.ExtLiveData
import com.adealink.frame.mvvm.livedata.ExtMutableLiveData
import com.adealink.frame.mvvm.viewmodel.BaseViewModel
import com.adealink.weparty.module.profile.data.Gender

class RegisterProfileViewModel : BaseViewModel() {
    val genderLD = MutableLiveData<Gender>()
    var gender: Gender? = null
    fun selectGender(gender: Gender) {
        this.gender = gender
        genderLD.send(gender)
    }

    val avatarPathLD = MutableLiveData<String>()
    val avatarUriLD = MutableLiveData<String>()
    var avatarPath: String? = null
    fun selectAvatarPath(avatarPath: String?, uri: String?) {
        this.avatarPath = avatarPath
        avatarPathLD.send(avatarPath)
        avatarUriLD.send(uri)
    }


    val birthdayLD = MutableLiveData<Long>()
    var birthday: Long? = null
    fun selectBirthday(birthday: Long) {
        this.birthday = birthday
        birthdayLD.send(birthday)
    }

    var genderSelectFinish: ExtLiveData<Unit> = ExtMutableLiveData()

    fun notifyGenderSelectFinish() {
        genderSelectFinish.send(Unit)
    }


    var completeUserInfoFinish: ExtLiveData<Unit> = ExtMutableLiveData()
    fun notifyCompleteUserInfoFinish() {
        completeUserInfoFinish.send(Unit)
    }
}