package app.voltplan.cable

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.runtime.CompositionLocalProvider
import app.voltplan.cable.ui.LocalUnitSettings
import app.voltplan.cable.ui.navigation.CableNavHost
import app.voltplan.cable.ui.theme.CableTheme

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        val app = application as CableApplication
        setContent {
            CableTheme {
                CompositionLocalProvider(LocalUnitSettings provides app.settings) {
                    CableNavHost()
                }
            }
        }
    }
}
