package com.base.pdfreader2.bean

import com.base.pdfreader2.utils.AppPreferences
import java.util.Locale

object ConstObject {

    const val MIME_TYPE_PDF = "application/pdf"
    const val MIME_TYPE_DOC = "application/msword"
    const val MIME_TYPE_DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
    const val MIME_TYPE_XLS = "application/vnd.ms-excel"
    const val MIME_TYPE_XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
    const val MIME_TYPE_PPT = "application/vnd.ms-powerpoint"
    const val MIME_TYPE_PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation"
    const val MIME_TYPE_APK = "application/vnd.android.package-archive"
    const val MIME_TYPE_ZIP = "application/zip"

    const val DOCUMENT_DATA_TYPE = "document"
    const val RECENT_DATA_TYPE = "recent"
    const val BOOKMARK_DATA_TYPE = "bookmark"

    const val UI_SORT_LAST_MODIFIED = "ui_sort_last_modified"
    const val UI_SORT_FINAL_MODIFIED = "ui_sort_final_modified"
    const val UI_SORT_NAME_A_Z = "ui_sort_name_a_z"
    const val UI_SORT_NAME_Z_A = "ui_sort_name_z_a"


    var haveSaveDemo = false
        get() {
            return AppPreferences.getInstance().getBoolean("haveSaveDemo", field)
        }
        set(value) {
            field = value
            AppPreferences.getInstance().put("haveSaveDemo", value, true)
        }
    var modeNight = false
        get() {
            return AppPreferences.getInstance().getBoolean("modeNight", field)
        }
        set(value) {
            field = value
            AppPreferences.getInstance().put("modeNight", value, true)
        }

    var appLanguageSp = Locale.ENGLISH.language
        get() {
            return AppPreferences.getInstance().getString("appLanguageSp", field)
        }
        set(value) {
            field = value
            AppPreferences.getInstance().put("appLanguageSp", value, true)
        }
    var changeLanguageSp = appLanguageSp
        get() {
            return AppPreferences.getInstance().getString("changeLanguageSp", field)
        }
        set(value) {
            field = value
            AppPreferences.getInstance().put("changeLanguageSp", value, true)
        }
    var topic_number = ""
        get() {
            return AppPreferences.getInstance().getString("topic_number", field)
        }
        set(value) {
            field = value
            AppPreferences.getInstance().put("topic_number", value, true)
        }
}