package aicg.wipf.ogbw.ezlb.rgmw

import aicg.wipf.vzuj.Kmqp.string
import com.test.basd.smartjunkcleaner.R

data class FileBean(
    var name: String = R.string.ސފޑނޠ_D.string(), var path: String, val size: Long, val isDir: Boolean = false, val type: String = R.string.ސފޑނޠ_D.string(), val time: Long = 0L, var isSelect: Boolean = false
) {
    fun isEmptyDir() = isDir

    fun isImage() = !isDir && type in listOf(R.string.ދޛރސތ_D.string(), R.string.ޒކހނޓ_D.string(), R.string.ޗމކބއ_D.string())

    fun isVideo() = !isDir && type in listOf(R.string.ޛޠފޕޅ_D.string())

    fun isAudio() = !isDir && type in listOf(R.string.ބސޖޝޚ_D.string())

    fun isLargeFile() = !isDir && size >= 10 * 1024 * 1024

    fun isZip() = !isDir && type in listOf(R.string.ޏޙޟބޑ_D.string(), R.string.ޞމޒދޖ_D.string(), "7z")

    fun isApk() = !isDir && type in listOf(R.string.ޞޏޥއޑ_D.string())

    fun isDoc() = !isDir && type in listOf(R.string.ޘޜޞޛޖ_D.string(), R.string.ލޠޗޏމ_D.string(), R.string.ޗޅޘތތ_D.string(), R.string.ކޤޢޜޏ_D.string(), R.string.ދރނޕޚ_D.string(), R.string.އޝޑޗޡ_D.string())

    fun isOther() = !isImage() && !isVideo() && !isAudio() && !isZip() && !isApk()
    fun isJunk() = !isDir && type in listOf(R.string.ޚޚޅޗޚ_D.string(), R.string.ޅޛލޕޒ_D.string(), R.string.ޗޓޜރޣ_D.string())
    fun isOtherTrash() = !isDir && type in listOf(R.string.ނފޝނޢ_D.string(), R.string.ލކނޣބ_D.string(), R.string.ޕޠރޜލ_D.string(), R.string.ޟޣޜޛދ_D.string(), R.string.ދއވޝދ_D.string(), R.string.ނށކޔޘ_D.string(), R.string.ލމޝތއ_D.string(), R.string.ޥޙމޜޥ_D.string(), R.string.ޟއޔޚނ_D.string(), R.string.ޙލމޕޢ_D.string(), R.string.ޡޑޣޗޔ_D.string())
}