package com.demotest.app

import android.app.Application
import com.demotest.app.data.local.prefModule
import com.demotest.app.data.remote.remoteDataSourceModule
import com.google.android.material.color.DynamicColors
import com.demotest.app.di.repoModules
import com.demotest.app.di.viewModules
import com.demotest.app.network.networkModule
import org.koin.android.ext.koin.androidContext
import org.koin.core.context.startKoin

class App : Application() {

    override fun onCreate() {
        super.onCreate()

        DynamicColors.applyToActivitiesIfAvailable(this)

        startKoin {
            androidContext(this@App)
            modules(koinModules)
        }
    }
}

val koinModules = listOf(
    prefModule,
    networkModule,
    remoteDataSourceModule,
    viewModules,
    repoModules
)