package com.syaroful.agrilinkvocpro.growth_recipe_feature

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import com.syaroful.agrilinkvocpro.growth_recipe_feature.di.appModule
import com.syaroful.agrilinkvocpro.growth_recipe_feature.di.networkModule
import com.syaroful.agrilinkvocpro.growth_recipe_feature.di.viewModelModule
import com.syaroful.agrilinkvocpro.growth_recipe_feature.naviagtion.SetupNavigation
import com.syaroful.agrilinkvocpro.presentation.theme.AgrilinkVocproTheme
import org.koin.core.context.loadKoinModules
import org.koin.core.context.unloadKoinModules

class GrowthRecipeActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        loadKoinModules(listOf(appModule, networkModule, viewModelModule))
        enableEdgeToEdge()
        setContent {
            AgrilinkVocproTheme {
                SetupNavigation()
            }
        }
    }

    override fun onDestroy() {
        super.onDestroy()
        unloadKoinModules(listOf(appModule, networkModule, viewModelModule))
    }
}