package ru.myitschool.work.data.di

import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.android.components.ViewModelComponent
import ru.myitschool.work.data.repo.AccountRepositoryImpl
import ru.myitschool.work.data.repo.AuthorizationRepositoryImpl
import ru.myitschool.work.domain.auth.repo.AuthorizationRepository
import ru.myitschool.work.domain.profile.repo.UserInfoRepository

@Module
@InstallIn(ViewModelComponent::class)
abstract class RepoModule {

    @Binds
    abstract fun bindAuthRepo(
        impl: AuthorizationRepositoryImpl
    ): AuthorizationRepository

    @Binds
    abstract fun bindAccountRepo(
        impl: AccountRepositoryImpl
    ): UserInfoRepository
}