package com.tt.honeyDue

import androidx.compose.ui.window.ComposeUIViewController
import com.tt.honeyDue.storage.TokenManager
import com.tt.honeyDue.storage.TokenStorage
import com.tt.honeyDue.storage.TaskCacheManager
import com.tt.honeyDue.storage.TaskCacheStorage
import com.tt.honeyDue.storage.BiometricPreference
import com.tt.honeyDue.storage.BiometricPreferenceManager
import com.tt.honeyDue.storage.ThemeStorage
import com.tt.honeyDue.storage.ThemeStorageManager
import com.tt.honeyDue.ui.theme.ThemeManager

fun MainViewController() = ComposeUIViewController {
    // Initialize TokenStorage with iOS TokenManager
    TokenStorage.initialize(TokenManager.getInstance())

    // Initialize TaskCacheStorage for offline task caching
    TaskCacheStorage.initialize(TaskCacheManager.getInstance())

    // Initialize ThemeStorage and ThemeManager
    ThemeStorage.initialize(ThemeStorageManager.getInstance())
    ThemeManager.initialize()

    // Initialize BiometricPreference storage
    BiometricPreference.initialize(BiometricPreferenceManager.getInstance())

    App()
}