package com.zaojiao.app.data.repo.di

import com.zaojiao.app.data.repo.BabyRepository
import com.zaojiao.app.data.repo.HomeRepository
import com.zaojiao.app.data.repo.StudyPlanRepository
import com.zaojiao.app.data.repo.UserRepository
import com.zaojiao.app.data.repo.impl.BabyRepositoryImpl
import com.zaojiao.app.data.repo.impl.HomeRepositoryImpl
import com.zaojiao.app.data.repo.impl.StudyPlanRepositoryImpl
import com.zaojiao.app.data.repo.impl.UserRepositoryImpl
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
interface RepoModule {
    @Binds
    @Singleton
    fun bindsUserRepository(
        userRepositoryImpl: UserRepositoryImpl,
    ): UserRepository

    @Binds
    @Singleton
    fun bindBabyRepository(
        babyRepositoryImpl: BabyRepositoryImpl,
    ): BabyRepository

    @Binds
    @Singleton
    fun bindHomeRepository(
        homeRepositoryImpl: HomeRepositoryImpl,
    ): HomeRepository

    @Binds
    @Singleton
    fun bindStudyPlanRepository(
        studyPlanRepositoryImpl: StudyPlanRepositoryImpl,
    ): StudyPlanRepository
}