package net.pokeranalytics.android.ui.view.rowrepresentable

import net.pokeranalytics.android.R
import net.pokeranalytics.android.ui.view.RowRepresentable
import net.pokeranalytics.android.ui.view.RowViewType

/**
 * An enum managing the report rows
 */
enum class ReportRow : RowRepresentable {
	BLINDS,
	BUY_IN,
	DAY_OF_WEEKS,
	GENERAL,
	LOCATIONS,
	NUMBER_OF_TABLES,
	TOURNAMENT_TYPES,
	VARIANT;


	companion object {
		/**
		 * Return the report rows
		 */
		fun getRows(): ArrayList<RowRepresentable> {
			val rows = ArrayList<RowRepresentable>()
			rows.add(CustomizableRowRepresentable(customViewType = RowViewType.HEADER_TITLE, resId = R.string.comparison))
			rows.addAll(values())
			return rows
		}
	}

	override val resId: Int?
		get() {
			return when (this) {
				BLINDS -> R.string.blinds
				BUY_IN -> R.string.buyin
				DAY_OF_WEEKS -> R.string.day_of_the_week
				GENERAL -> R.string.general
				LOCATIONS -> R.string.locations
				NUMBER_OF_TABLES -> R.string.number_of_tables
				TOURNAMENT_TYPES -> R.string.tournament_type_complete
				VARIANT -> R.string.variant
			}
		}

	override val viewType: Int = RowViewType.TITLE_ARROW.ordinal
}