package com.jidan.jiaoyi

import android.graphics.Color
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.core.view.WindowCompat
import com.jidan.jiaoyi.data.AiConversationStore
import com.jidan.jiaoyi.ui.JiaoyiAiApp
import com.jidan.jiaoyi.ui.JiaoyiAiTheme

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        window.statusBarColor = Color.WHITE
        window.navigationBarColor = Color.WHITE
        WindowCompat.getInsetsController(window, window.decorView).apply {
            isAppearanceLightStatusBars = true
            isAppearanceLightNavigationBars = true
        }

        val conversationStore = AiConversationStore(applicationContext)
        setContent {
            JiaoyiAiTheme {
                JiaoyiAiApp(conversationStore = conversationStore)
            }
        }
    }
}
