package com.syaroful.agrilinkvocpro.presentation.screen.register

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.syaroful.agrilinkvocpro.core.utils.ResultState
import com.syaroful.agrilinkvocpro.data.model.LoginResponse
import com.syaroful.agrilinkvocpro.data.repository.AuthRepository
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.launch

class RegisterViewModel(
    authRepository: AuthRepository,
) : ViewModel(){
    private val _signupState = MutableStateFlow<ResultState<LoginResponse>>(ResultState.Idle)
    val signupState: StateFlow<ResultState<LoginResponse>> = _signupState

    fun signup(name: String, username: String, email: String, password: String){
        _signupState.value = ResultState.Loading
        viewModelScope.launch {
            try {

            }catch (e: Exception){
                
            }
        }
    }
}