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

import net.pokeranalytics.android.R
import net.pokeranalytics.android.ui.fragment.components.bottomsheet.BottomSheetType
import net.pokeranalytics.android.ui.view.DefaultEditDataSource
import net.pokeranalytics.android.ui.view.RowRepresentable
import net.pokeranalytics.android.ui.view.RowViewType


enum class LocationRow : RowRepresentable, DefaultEditDataSource {
	LOCATION_PERMISSION_SWITCH,
	LOCATION_LOADER;

    override val resId: Int?
        get() {
            return when (this) {
	            LOCATION_PERMISSION_SWITCH -> R.string.geo_locate
                LOCATION_LOADER -> null
            }
        }

    override val viewType: Int
        get() {
            return when (this) {
	            LOCATION_PERMISSION_SWITCH -> RowViewType.TITLE_SWITCH.ordinal
                LOCATION_LOADER -> RowViewType.LOADER.ordinal
            }
        }

    override val bottomSheetType: BottomSheetType
        get() {
            return when (this) {
	            LOCATION_PERMISSION_SWITCH -> BottomSheetType.NONE
                LOCATION_LOADER -> BottomSheetType.NONE
            }
        }

}
