package com.kdanmobile.reader.setting

import android.arch.lifecycle.LiveData
import android.arch.lifecycle.ViewModel
import com.kdanmobile.reader.screen.model.SharePrefsModel

class ReaderSettingViewModel(private val sharePrefsModel: SharePrefsModel) : ViewModel() {

    val readMode: LiveData<Int>
        get() = sharePrefsModel.readMode

    val isCropModeEnable: LiveData<Boolean>
        get() = sharePrefsModel.isCropModeEnable

    val isShowStateBarEnable: LiveData<Boolean>
        get() = sharePrefsModel.isShowStateBarEnable

    val turnPageDirection: LiveData<Int>
        get() = sharePrefsModel.turnPageDirection

    val isShowTurnPageBtnEnable: LiveData<Boolean>
        get() = sharePrefsModel.isShowTurnPageBtnEnable

    val isLockScreenSleepEnable: LiveData<Boolean>
        get() = sharePrefsModel.isLockScreenSleepEnable

    val isShowCommentToolEnable: LiveData<Boolean>
        get() = sharePrefsModel.isShowCommentToolEnable

    val isShowBOTAToolEnable: LiveData<Boolean>
        get() = sharePrefsModel.isShowBOTAToolEnable

    fun setReadMode(readMode: Int) {
        sharePrefsModel.setReadMode(readMode)
    }

    fun setCropModeEnable(enable: Boolean) {
        sharePrefsModel.setCropModeEnable(enable)
    }

    fun setShowStateBarEnable(enable: Boolean) {
        sharePrefsModel.setShowStateBarEnable(enable)
    }

    fun setTurnPageDirection(direction: Int) {
        sharePrefsModel.setTurnPageDirection(direction)
    }

    fun setTurnPageButtonEnable(enable: Boolean) {
        sharePrefsModel.setTurnPageButtonEnable(enable)
    }

    fun setLockScreenSleepEnable(enable: Boolean) {
        sharePrefsModel.setLockScreenSleepEnable(enable)
    }

    fun setShowCommentToolEnable(enable: Boolean) {
        sharePrefsModel.setShowCommentToolEnable(enable)
    }

    fun setShowBOTAToolEnable(enable: Boolean) {
        sharePrefsModel.setShowBOTAToolEnable(enable)
    }
}

