package de.krisenvorrat.app.di

import android.content.Context
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import de.krisenvorrat.app.data.security.EncryptedPrefsTokenStorage
import de.krisenvorrat.app.data.security.SecureTokenStorage
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
internal object SecurityModule {

    @Provides
    @Singleton
    fun provideSecureTokenStorage(@ApplicationContext context: Context): SecureTokenStorage =
        EncryptedPrefsTokenStorage(context)
}
