package ru.dbotthepony.mc.otm.client.screen.panels

import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.core.chart.AbstractHistoryChart

abstract class AbstractHistoryGraphPanel<out S : MatteryScreen<*>, G : AbstractHistoryChart<V>, V : Any>(
	screen: S,
	parent: EditablePanel<*>,
	val graph: G,
	x: Float = 0f,
	y: Float = 0f,
	width: Float = 10f,
	height: Float = 10f
) : EditablePanel<S>(screen, parent, x, y, width, height) {
	data class GraphData<V : Any>(val maximum: V)

	protected abstract fun determineGraphData(): GraphData<V>
	protected abstract fun ratio(value: V, maximum: V): Float
}
