package net.pokeranalytics.android.ui.activity

import android.os.Bundle
import net.pokeranalytics.android.R
import net.pokeranalytics.android.ui.activity.components.ReportActivity
import net.pokeranalytics.android.ui.fragment.report.ComparisonReportFragment


class ComparisonReportActivity : ReportActivity() {

	override fun onCreate(savedInstanceState: Bundle?) {
		super.onCreate(savedInstanceState)
		setContentView(R.layout.activity_report_details)
		initUI()
	}

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

		parameters?.let {

			val report = it.report
			val title = it.title

			val fragmentTransaction = supportFragmentManager.beginTransaction()
			val reportDetailsFragment = ComparisonReportFragment.newInstance(report, title)
			fragmentTransaction.add(R.id.reportDetailsContainer, reportDetailsFragment)
			fragmentTransaction.commit()
		}
		parameters = null

	}

}
