package ru.fincode.tsudesk.core.config.di

import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import ru.fincode.tsudesk.core.config.data.ConfigRepositoryImpl
import ru.fincode.tsudesk.core.config.data.datasource.ConfigRemoteDataSource
import ru.fincode.tsudesk.core.config.data.datasource.ConfigRemoteDataSourceImpl
import ru.fincode.tsudesk.core.config.domain.ConfigRepository
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
abstract class ConfigRepositoryModule {

    @Binds
    @Singleton
    abstract fun bindRemoteDataSource(
        impl: ConfigRemoteDataSourceImpl
    ): ConfigRemoteDataSource

    @Binds
    @Singleton
    abstract fun bindRepository(
        impl: ConfigRepositoryImpl
    ): ConfigRepository
}
