package com.tt.honeyDue.storage

/**
 * Cross-platform theme storage for persisting theme selection.
 * Uses platform-specific implementations (SharedPreferences on Android, UserDefaults on iOS).
 */
object ThemeStorage {
    private var manager: ThemeStorageManager? = null

    fun initialize(themeManager: ThemeStorageManager) {
        manager = themeManager
    }

    fun saveThemeId(themeId: String) {
        manager?.saveThemeId(themeId)
    }

    fun getThemeId(): String? {
        return manager?.getThemeId()
    }

    fun clearThemeId() {
        manager?.clearThemeId()
    }
}

/**
 * Platform-specific theme storage interface.
 * Each platform implements this using their native storage mechanisms.
 */
expect class ThemeStorageManager {
    fun saveThemeId(themeId: String)
    fun getThemeId(): String?
    fun clearThemeId()
}
