package ru.dbotthepony.mc.otm.menu.storage

import net.minecraft.world.entity.player.Inventory
import ru.dbotthepony.mc.otm.block.entity.storage.AbstractStorageImportExport
import ru.dbotthepony.mc.otm.menu.MatteryPoweredMenu
import ru.dbotthepony.mc.otm.menu.addFilterControls
import ru.dbotthepony.mc.otm.menu.input.EnergyConfigPlayerInput
import ru.dbotthepony.mc.otm.menu.widget.ProfiledLevelGaugeWidget
import ru.dbotthepony.mc.otm.registry.game.MMenus

class StorageImporterExporterMenu(
	containerId: Int, inventory: Inventory, tile: AbstractStorageImportExport? = null
) : MatteryPoweredMenu(MMenus.STORAGE_IMPORTER_EXPORTER, containerId, inventory, tile)  {
	val filter = addFilterControls(tile?.let { it::filter }, AbstractStorageImportExport.MAX_FILTERS)
	val profiledEnergy = ProfiledLevelGaugeWidget(this, tile?.energy, energyWidget)
	val energyConfig = EnergyConfigPlayerInput(this, tile?.energyConfig)

	init {
		addInventorySlots()
	}
}
