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

import com.zaojiao.app.data.repo.BabyRepository
import com.zaojiao.app.data.repo.LoginRepository
import com.zaojiao.app.data.repo.UserRepository
import com.zaojiao.app.data.repo.impl.BabyRepositoryImpl
import com.zaojiao.app.data.repo.impl.LoginRepositoryImpl
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 bindLoginRepository(
        loginRepositoryImpl: LoginRepositoryImpl,
    ): LoginRepository
}