aboutsummaryrefslogtreecommitdiff
path: root/src/compat/moulconfig/java/ProcessedOptionFirm.kt
blob: 4d0096c34490bf2848ae16f15dd1498a2ac1a846 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package moe.nea.firmament.compat.moulconfig

import io.github.notenoughupdates.moulconfig.Config
import io.github.notenoughupdates.moulconfig.annotations.SearchTag
import io.github.notenoughupdates.moulconfig.gui.GuiOptionEditor
import io.github.notenoughupdates.moulconfig.processor.ProcessedCategory
import io.github.notenoughupdates.moulconfig.processor.ProcessedOption

abstract class ProcessedOptionFirm(
	private val accordionId: Int,
	private val config: Config
) : ProcessedOption {
	lateinit var category: ProcessedCategoryFirm
	override fun getAccordionId(): Int {
		return accordionId
	}

	protected abstract fun createEditor(): GuiOptionEditor
	val editorInstance by lazy { createEditor() }

	override fun getSearchTags(): Array<SearchTag> {
		return emptyArray()
	}

	override fun getEditor(): GuiOptionEditor {
		return editorInstance
	}

	override fun getCategory(): ProcessedCategory {
		return category
	}

	override fun getConfig(): Config {
		return config
	}

	override fun explicitNotifyChange() {
	}
}