package dev.adriankuta.flights.model.data.simple.di

import dagger.Binds
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import dev.adriankuta.flights.model.data.simple.AirportsDatasourceImpl
import dev.adriankuta.flights.model.datasource.airports.AirportsDatasource
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
@Suppress("UnnecessaryAbstractClass")
internal abstract class AirportsDatasourceModule {
    @Binds
    abstract fun bindApi(impl: AirportsDatasourceImpl): AirportsDatasource

    /*@Binds
    @IntoSet
    abstract fun bindReset(impl: RolesDatasourceImpl): ClearDatasource*/
}

@Module
@InstallIn(SingletonComponent::class)
internal class AirportsDatasourceImplModule {
    @Provides
    @Singleton
    fun provide(): AirportsDatasourceImpl = AirportsDatasourceImpl()
}
