package com.zaojiao.app.feat.home.plan

import com.zaojiao.app.data.repo.StudyPlanRepository
import com.zaojiao.app.feat.design.viewmodel.BaseViewModel
import com.zaojiao.app.feat.home.plan.state.HomePlanIndexUiState
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class HomePlanViewModel @Inject constructor(
    private val studyPlanRepository: StudyPlanRepository,
) : BaseViewModel<HomePlanIndexUiState>() {
    override suspend fun initData(): HomePlanIndexUiState {
        val todayPlanList = studyPlanRepository.getTodayPlanList()
        val tomorrowPlanList = studyPlanRepository.getTomorrowPlanList()

        return HomePlanIndexUiState(
            todayPlanList = todayPlanList,
            tomorrowPlanList = tomorrowPlanList,
        )
    }
}