package com.kaixed.kchat.utils

import com.kaixed.kchat.utils.Constants.KEYBOARD_DEFAULT_HEIGHT
import com.kaixed.kchat.utils.Constants.KEYBOARD_HEIGHT
import com.kaixed.kchat.utils.Constants.MMKV_COMMON_DATA
import com.kaixed.kchat.utils.Constants.MMKV_USER_SESSION
import com.kaixed.kchat.utils.Constants.STATUS_BAR_DEFAULT_HEIGHT
import com.kaixed.kchat.utils.Constants.STATUS_BAR_HEIGHT
import com.kaixed.kchat.utils.Constants.USERNAME_KEY
import com.tencent.mmkv.MMKV

/**
 * @Author: kaixed
 * @Date: 2024/10/24 22:04
 */
object ConstantsUtil {

    fun getKeyboardHeight(): Int = MMKV.mmkvWithID(MMKV_COMMON_DATA)
        .getInt(KEYBOARD_HEIGHT, KEYBOARD_DEFAULT_HEIGHT)

    fun getUsername(): String = MMKV.mmkvWithID(MMKV_USER_SESSION)
        .getString(USERNAME_KEY, "").toString()

    fun getStatusBarHeight(): Int = MMKV.mmkvWithID(MMKV_COMMON_DATA)
        .getInt(STATUS_BAR_HEIGHT, STATUS_BAR_DEFAULT_HEIGHT)
}
