package ru.notesapp
import android.os.Bundle
import androidx.activity.compose.setContent
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.fragment.app.FragmentActivity
import dagger.hilt.android.AndroidEntryPoint
import ru.notesapp.ui.RootScreen
import ru.notesapp.ui.theme.NotesAppTheme
import ru.notesapp.ui.theme.ThemeVariant
@AndroidEntryPoint
class MainActivity : FragmentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
var themeVariant by remember { mutableStateOf(ThemeVariant.PASTEL) }
NotesAppTheme(themeVariant = themeVariant) {
RootScreen(
currentTheme = themeVariant,
onThemeChange = { themeVariant = it }
)
}
}
}
}