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

import net.minecraft.client.gui.screens.Screen
import net.minecraft.network.chat.Component
import ru.dbotthepony.mc.otm.client.minecraft
import ru.dbotthepony.mc.otm.client.render.AbstractMatterySprite
import ru.dbotthepony.mc.otm.client.render.Widgets18
import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel
import ru.dbotthepony.mc.otm.core.GetterSetter
import ru.dbotthepony.mc.otm.menu.input.IPlayerInputWithFeedback

open class LargeBooleanRectangleButtonPanel<out S : Screen>(
	screen: S,
	parent: EditablePanel<*>?,
	x: Float = 0f,
	y: Float = 0f,
	width: Float = SIZE,
	height: Float = SIZE,
	prop: GetterSetter<Boolean>,
	skinElementActive: AbstractMatterySprite? = null,
	skinElementInactive: AbstractMatterySprite? = null,
	onChange: ((newValue: Boolean) -> Unit)? = null,
	tooltipActive: Component? = null,
	tooltipInactive: Component? = null,
) : BooleanRectangleButtonPanel<S>(screen, parent, x, y, width, height, prop, skinElementActive, skinElementInactive, onChange, tooltipActive, tooltipInactive) {
	final override val IDLE = Widgets18.BUTTON_IDLE
	final override val HOVERED = Widgets18.BUTTON_HOVERED
	final override val PRESSED = Widgets18.BUTTON_PRESSED
	final override val DISABLED = Widgets18.BUTTON_DISABLED

	companion object {
		const val SIZE = 18f
	}
}
