package com.zaojiao.app.core.auth.ui

import android.app.Activity
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.zaojiao.app.core.auth.model.TokenModel
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.runBlocking
import javax.inject.Inject

@AndroidEntryPoint
class TokenActivity : AppCompatActivity() {

    @Inject
    public lateinit var tokenViewModel: TokenViewModel

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        val tokenModel = TokenModel(
            accessToken = "",
            refreshToken = "",
        )

        runBlocking {
            tokenViewModel.saveToken(tokenModel)
        }

        finish()
    }
}