package com.isidroid.c23.di

import android.content.Context
import com.isidroid.c23.data.source.local.AppDataBase
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

@InstallIn(SingletonComponent::class)
@Module
object DatabaseModule {
    @Provides @Singleton
    fun providesAppDatabase(@ApplicationContext context: Context): AppDataBase = AppDataBase.database(context)

    @Provides @Singleton
    fun providesPaperDao(appDataBase: AppDataBase) = appDataBase.printProfileDao

    @Provides @Singleton
    fun providesSpotDao(appDataBase: AppDataBase) = appDataBase.spotDao
}