package com.tt.honeyDue.storage

/**
 * Cross-platform biometric preference storage for persisting biometric lock setting.
 * Uses platform-specific implementations (SharedPreferences on Android, UserDefaults on iOS).
 * Follows the same pattern as ThemeStorage / ThemeStorageManager.
 */
object BiometricPreference {
    private var manager: BiometricPreferenceManager? = null

    fun initialize(biometricManager: BiometricPreferenceManager) {
        manager = biometricManager
    }

    fun isBiometricEnabled(): Boolean {
        return manager?.isBiometricEnabled() ?: false
    }

    fun setBiometricEnabled(enabled: Boolean) {
        manager?.setBiometricEnabled(enabled)
    }
}

/**
 * Platform-specific biometric preference storage interface.
 * Each platform implements this using their native storage mechanisms.
 */
expect class BiometricPreferenceManager {
    fun isBiometricEnabled(): Boolean
    fun setBiometricEnabled(enabled: Boolean)
}
