package net.pokeranalytics.android.ui.activity

import android.content.Context
import android.content.Intent
import android.os.Bundle
import kotlinx.android.synthetic.main.activity_data_list.*
import net.pokeranalytics.android.R
import net.pokeranalytics.android.ui.activity.components.PokerAnalyticsActivity
import net.pokeranalytics.android.ui.fragment.DataListFragment

class DataListActivity : PokerAnalyticsActivity() {
	enum class IntentKey(val keyName: String) {
		DATA_TYPE("DATA_TYPE"),
	}

	companion object {
		fun newInstance(context: Context, dataType: Int) {
			val intent = Intent(context, DataListActivity::class.java)
			intent.putExtra(IntentKey.DATA_TYPE.keyName, dataType)
			context.startActivity(intent)
		}
	}

	override fun onCreate(savedInstanceState: Bundle?) {
		super.onCreate(savedInstanceState)
		setContentView(R.layout.activity_data_list)

		initUI()
	}

	/**
	 * Init UI
	 */
	private fun initUI() {

		val dataType = intent.getIntExtra(IntentKey.DATA_TYPE.keyName, 0)
		val fragment = dataListFragment as DataListFragment
		fragment.setData(dataType)
	}

	/**
	 * Init data
	 */
	private fun initData() {


	}

}