package register

import (
	"gitea.maximumdirect.net/eric/notarius/internal/framework/pipeline"
	"gitea.maximumdirect.net/eric/notarius/internal/modules/dnd"
	combatinvariants "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/combatturns/invariants"
	combatshape "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/combatturns/shape"
	combatsourcerefs "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/combatturns/source_refs"
	combatrelatedness "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/combatturns/source_relatedness"
	enemyeventengagements "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/enemyevents/engagements"
	enemyeventinvariants "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/enemyevents/invariants"
	enemyeventshape "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/enemyevents/shape"
	enemyeventrefs "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/enemyevents/source_refs"
	enemyeventrelatedness "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/enemyevents/source_relatedness"
	itemoccurrenceinvariants "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/itemoccurrences/invariants"
	itemoccurrenceregistry "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/itemoccurrences/registry"
	itemoccurrenceshape "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/itemoccurrences/shape"
	itemoccurrencerefs "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/itemoccurrences/source_refs"
	itemoccurrencerelatedness "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/itemoccurrences/source_relatedness"
	itemidentity "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/itemregistry/identity"
	itemshape "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/itemregistry/shape"
	itemrefs "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/itemregistry/source_refs"
	itemrelatedness "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/itemregistry/source_relatedness"
	locationoccurrenceinvariants "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/locationoccurrences/invariants"
	locationoccurrenceregistry "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/locationoccurrences/registry"
	locationoccurrenceshape "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/locationoccurrences/shape"
	locationoccurrencerefs "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/locationoccurrences/source_refs"
	locationoccurrencerelatedness "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/locationoccurrences/source_relatedness"
	locationidentity "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/locationregistry/identity"
	locationshape "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/locationregistry/shape"
	locationrefs "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/locationregistry/source_refs"
	locationrelatedness "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/locationregistry/source_relatedness"
	npcoccurrenceinvariants "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/npcoccurrences/invariants"
	npcoccurrenceregistry "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/npcoccurrences/registry"
	npcoccurrenceshape "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/npcoccurrences/shape"
	npcoccurrencerefs "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/npcoccurrences/source_refs"
	npcoccurrencerelatedness "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/npcoccurrences/source_relatedness"
	npcidentity "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/npcregistry/identity"
	npcshape "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/npcregistry/shape"
	npcsourcerefs "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/npcregistry/source_refs"
	npcrelatedness "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/npcregistry/source_relatedness"
	combatsemantics "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/scenedescriptions/combat_semantics"
	sceneinvariants "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/scenedescriptions/invariants"
	sceneshape "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/scenedescriptions/shape"
	scenerefs "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/scenedescriptions/source_refs"
	scenerelatedness "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/scenedescriptions/source_relatedness"
	spellcatalog "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/spells/catalog"
	spellshape "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/spells/shape"
	spellsourcerefs "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/spells/source_refs"
	spellrelatedness "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/validate/spells/source_relatedness"
	alwaysaccept "gitea.maximumdirect.net/eric/notarius/internal/modules/generic/validate/always_accept"
	alwaysreject "gitea.maximumdirect.net/eric/notarius/internal/modules/generic/validate/always_reject"
)

func registerValidators(registries pipeline.Registries) error {
	return runRegistrations([]registration{
		{name: "spell shape validator", register: func() error { return spellshape.Register(registries.Validators) }},
		{name: "spell catalog validator", register: func() error { return spellcatalog.Register(registries.Validators) }},
		{name: "spell source references validator", register: func() error { return spellsourcerefs.Register(registries.Validators) }},
		{name: "spell source relatedness validator", register: func() error { return spellrelatedness.Register(registries.Validators) }},
		{name: "npc shape validator", register: func() error { return npcshape.Register(registries.Validators) }},
		{name: "npc identity validator", register: func() error { return npcidentity.Register(registries.Validators) }},
		{name: "npc source references validator", register: func() error { return npcsourcerefs.Register(registries.Validators) }},
		{name: "npc source relatedness validator", register: func() error { return npcrelatedness.Register(registries.Validators) }},
		{name: "combat shape validator", register: func() error { return combatshape.Register(registries.Validators) }},
		{name: "combat source references validator", register: func() error { return combatsourcerefs.Register(registries.Validators) }},
		{name: "combat source relatedness validator", register: func() error { return combatrelatedness.Register(registries.Validators) }},
		{name: "combat normalized invariants validator", register: func() error { return combatinvariants.Register(registries.Validators) }},
		{name: "enemy event shape validator", register: func() error { return enemyeventshape.Register(registries.Validators) }},
		{name: "enemy event engagement validator", register: func() error { return enemyeventengagements.Register(registries.Validators) }},
		{name: "enemy event source references validator", register: func() error { return enemyeventrefs.Register(registries.Validators) }},
		{name: "enemy event source relatedness validator", register: func() error { return enemyeventrelatedness.Register(registries.Validators) }},
		{name: "enemy event normalized invariants validator", register: func() error { return enemyeventinvariants.Register(registries.Validators) }},
		{name: "item occurrence shape validator", register: func() error { return itemoccurrenceshape.Register(registries.Validators) }},
		{name: "item occurrence registry validator", register: func() error { return itemoccurrenceregistry.Register(registries.Validators) }},
		{name: "item occurrence source references validator", register: func() error { return itemoccurrencerefs.Register(registries.Validators) }},
		{name: "item occurrence source relatedness validator", register: func() error { return itemoccurrencerelatedness.Register(registries.Validators) }},
		{name: "item occurrence normalized invariants validator", register: func() error { return itemoccurrenceinvariants.Register(registries.Validators) }},
		{name: "item shape validator", register: func() error { return itemshape.Register(registries.Validators) }},
		{name: "item identity validator", register: func() error { return itemidentity.Register(registries.Validators) }},
		{name: "item source references validator", register: func() error { return itemrefs.Register(registries.Validators) }},
		{name: "item source relatedness validator", register: func() error { return itemrelatedness.Register(registries.Validators) }},
		{name: "npc occurrence shape validator", register: func() error { return npcoccurrenceshape.Register(registries.Validators) }},
		{name: "npc occurrence registry validator", register: func() error { return npcoccurrenceregistry.Register(registries.Validators) }},
		{name: "npc occurrence source references validator", register: func() error { return npcoccurrencerefs.Register(registries.Validators) }},
		{name: "npc occurrence source relatedness validator", register: func() error { return npcoccurrencerelatedness.Register(registries.Validators) }},
		{name: "npc occurrence normalized invariants validator", register: func() error { return npcoccurrenceinvariants.Register(registries.Validators) }},
		{name: "scene description shape validator", register: func() error { return sceneshape.Register(registries.Validators) }},
		{name: "scene description source references validator", register: func() error { return scenerefs.Register(registries.Validators) }},
		{name: "scene description source relatedness validator", register: func() error { return scenerelatedness.Register(registries.Validators) }},
		{name: "scene description combat semantics validator", register: func() error { return combatsemantics.Register(registries.Validators) }},
		{name: "scene description normalized invariants validator", register: func() error { return sceneinvariants.Register(registries.Validators) }},
		{name: "location shape validator", register: func() error { return locationshape.Register(registries.Validators) }},
		{name: "location identity validator", register: func() error { return locationidentity.Register(registries.Validators) }},
		{name: "location source references validator", register: func() error { return locationrefs.Register(registries.Validators) }},
		{name: "location source relatedness validator", register: func() error { return locationrelatedness.Register(registries.Validators) }},
		{name: "location occurrence shape validator", register: func() error { return locationoccurrenceshape.Register(registries.Validators) }},
		{name: "location occurrence registry validator", register: func() error { return locationoccurrenceregistry.Register(registries.Validators) }},
		{name: "location occurrence normalized invariants validator", register: func() error { return locationoccurrenceinvariants.Register(registries.Validators) }},
		{name: "location occurrence source references validator", register: func() error { return locationoccurrencerefs.Register(registries.Validators) }},
		{name: "location occurrence source relatedness validator", register: func() error { return locationoccurrencerelatedness.Register(registries.Validators) }},
		{name: "spell-list always accept validator", register: func() error {
			return alwaysaccept.RegisterTyped[dnd.SpellList](registries.Validators, dnd.SpellListKind)
		}},
		{name: "spell-list always reject validator", register: func() error {
			return alwaysreject.RegisterTyped[dnd.SpellList](registries.Validators, dnd.SpellListKind)
		}},
		{name: "npc registry always accept validator", register: func() error {
			return alwaysaccept.RegisterTyped[dnd.NPCRegistry](registries.Validators, dnd.NPCRegistryKind)
		}},
		{name: "npc registry always reject validator", register: func() error {
			return alwaysreject.RegisterTyped[dnd.NPCRegistry](registries.Validators, dnd.NPCRegistryKind)
		}},
		{name: "combat-turn-list always accept validator", register: func() error {
			return alwaysaccept.RegisterTyped[dnd.CombatTurnList](registries.Validators, dnd.CombatTurnListKind)
		}},
		{name: "combat-turn-list always reject validator", register: func() error {
			return alwaysreject.RegisterTyped[dnd.CombatTurnList](registries.Validators, dnd.CombatTurnListKind)
		}},
		{name: "enemy-event-list always accept validator", register: func() error {
			return alwaysaccept.RegisterTyped[dnd.EnemyEventList](registries.Validators, dnd.EnemyEventListKind)
		}},
		{name: "enemy-event-list always reject validator", register: func() error {
			return alwaysreject.RegisterTyped[dnd.EnemyEventList](registries.Validators, dnd.EnemyEventListKind)
		}},
		{name: "item-occurrence-list always accept validator", register: func() error {
			return alwaysaccept.RegisterTyped[dnd.ItemOccurrenceList](registries.Validators, dnd.ItemOccurrenceListKind)
		}},
		{name: "item-occurrence-list always reject validator", register: func() error {
			return alwaysreject.RegisterTyped[dnd.ItemOccurrenceList](registries.Validators, dnd.ItemOccurrenceListKind)
		}},
		{name: "item-registry always accept validator", register: func() error {
			return alwaysaccept.RegisterTyped[dnd.ItemRegistry](registries.Validators, dnd.ItemRegistryKind)
		}},
		{name: "item-registry always reject validator", register: func() error {
			return alwaysreject.RegisterTyped[dnd.ItemRegistry](registries.Validators, dnd.ItemRegistryKind)
		}},
		{name: "npc-occurrence-list always accept validator", register: func() error {
			return alwaysaccept.RegisterTyped[dnd.NPCOccurrenceList](registries.Validators, dnd.NPCOccurrenceListKind)
		}},
		{name: "npc-occurrence-list always reject validator", register: func() error {
			return alwaysreject.RegisterTyped[dnd.NPCOccurrenceList](registries.Validators, dnd.NPCOccurrenceListKind)
		}},
		{name: "scene-description-list always accept validator", register: func() error {
			return alwaysaccept.RegisterTyped[dnd.SceneDescriptionList](registries.Validators, dnd.SceneDescriptionListKind)
		}},
		{name: "scene-description-list always reject validator", register: func() error {
			return alwaysreject.RegisterTyped[dnd.SceneDescriptionList](registries.Validators, dnd.SceneDescriptionListKind)
		}},
		{name: "location-registry always accept validator", register: func() error {
			return alwaysaccept.RegisterTyped[dnd.LocationRegistry](registries.Validators, dnd.LocationRegistryKind)
		}},
		{name: "location-registry always reject validator", register: func() error {
			return alwaysreject.RegisterTyped[dnd.LocationRegistry](registries.Validators, dnd.LocationRegistryKind)
		}},
		{name: "location-occurrence-list always accept validator", register: func() error {
			return alwaysaccept.RegisterTyped[dnd.LocationOccurrenceList](registries.Validators, dnd.LocationOccurrenceListKind)
		}},
		{name: "location-occurrence-list always reject validator", register: func() error {
			return alwaysreject.RegisterTyped[dnd.LocationOccurrenceList](registries.Validators, dnd.LocationOccurrenceListKind)
		}},
	})
}
