package net.pokeranalytics.android.calculus

import net.pokeranalytics.android.R
import net.pokeranalytics.android.model.Criteria
import net.pokeranalytics.android.ui.graph.AxisFormatting

enum class AggregationType {
	SESSION,
	MONTH,
	YEAR,
	DURATION;

	val resId: Int
		get() {
			return when (this) {
				SESSION -> R.string.session
				MONTH -> R.string.month
				YEAR -> R.string.year
				DURATION -> R.string.duration
			}
		}

	val axisFormatting: AxisFormatting
		get() {
			return when (this) {
				DURATION -> AxisFormatting.X_DURATION
				else -> AxisFormatting.DEFAULT
			}
		}

	val criterias: List<Criteria>
		get() {
			return when (this) {
				MONTH -> listOf(Criteria.AllMonthsUpToNow)
				YEAR -> listOf(Criteria.Years)
				else -> listOf()
			}
		}

}