package dev.privacyllc.period

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import dagger.hilt.android.AndroidEntryPoint
import dev.privacyllc.period.designsystem.PeriodTheme
import dev.privacyllc.period.navigation.PeriodRoot

@AndroidEntryPoint
class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        enableEdgeToEdge()
        super.onCreate(savedInstanceState)
        setContent {
            PeriodTheme {
                // The action tapped on a notification, if the app was opened by
                // one. Nothing is shown differently because of it — the answer
                // is recorded and the user lands on the normal screen, behind
                // whatever device lock they have (§31).
                PeriodRoot(notificationAction = intent?.getStringExtra("reminder_action"))
            }
        }
    }
}
