package iace

// TagEntry represents a tag in the taxonomy with its domain and description.
type TagEntry struct {
	ID          string `json:"id"`
	Domain      string `json:"domain"`
	DescriptionDE string `json:"description_de"`
	DescriptionEN string `json:"description_en"`
}

// GetTagTaxonomy returns the complete tag taxonomy (~85 tags in 5 domains).
func GetTagTaxonomy() []TagEntry {
	return []TagEntry{
		// ── Domain: component (~30 tags) ────────────────────────────────────
		{ID: "moving_part", Domain: "component", DescriptionDE: "Bewegtes Maschinenteil", DescriptionEN: "Moving machine part"},
		{ID: "rotating_part", Domain: "component", DescriptionDE: "Rotierendes Bauteil", DescriptionEN: "Rotating component"},
		{ID: "cutting_part", Domain: "component", DescriptionDE: "Schneidendes Werkzeug", DescriptionEN: "Cutting tool"},
		{ID: "clamping_part", Domain: "component", DescriptionDE: "Spannendes/Greifendes Bauteil", DescriptionEN: "Clamping/gripping part"},
		{ID: "structural_part", Domain: "component", DescriptionDE: "Tragendes/Strukturelles Bauteil", DescriptionEN: "Structural/supporting part"},
		{ID: "hydraulic_part", Domain: "component", DescriptionDE: "Hydraulikkomponente", DescriptionEN: "Hydraulic component"},
		{ID: "pneumatic_part", Domain: "component", DescriptionDE: "Pneumatikkomponente", DescriptionEN: "Pneumatic component"},
		{ID: "electrical_part", Domain: "component", DescriptionDE: "Elektrische Komponente", DescriptionEN: "Electrical component"},
		{ID: "sensor_part", Domain: "component", DescriptionDE: "Sensorisches Bauteil", DescriptionEN: "Sensor component"},
		{ID: "actuator_part", Domain: "component", DescriptionDE: "Aktor/Stellglied", DescriptionEN: "Actuator part"},
		{ID: "safety_device", Domain: "component", DescriptionDE: "Sicherheitseinrichtung", DescriptionEN: "Safety device"},
		{ID: "security_device", Domain: "component", DescriptionDE: "IT-Sicherheitsgeraet", DescriptionEN: "IT security device"},
		{ID: "guard", Domain: "component", DescriptionDE: "Schutzeinrichtung (trennend)", DescriptionEN: "Guard (separating)"},
		{ID: "interlocked", Domain: "component", DescriptionDE: "Verriegelt/Ueberwacht", DescriptionEN: "Interlocked/monitored"},
		{ID: "emergency_stop", Domain: "component", DescriptionDE: "Not-Halt-Funktion", DescriptionEN: "Emergency stop function"},
		{ID: "high_voltage", Domain: "component", DescriptionDE: "Hochspannung (>50V AC / >120V DC)", DescriptionEN: "High voltage (>50V AC / >120V DC)"},
		{ID: "high_force", Domain: "component", DescriptionDE: "Hohe Kraft/Drehmoment", DescriptionEN: "High force/torque"},
		{ID: "high_speed", Domain: "component", DescriptionDE: "Hohe Geschwindigkeit/Drehzahl", DescriptionEN: "High speed/rpm"},
		{ID: "high_pressure", Domain: "component", DescriptionDE: "Hoher Druck", DescriptionEN: "High pressure"},
		{ID: "high_temperature", Domain: "component", DescriptionDE: "Hohe Temperatur", DescriptionEN: "High temperature"},
		{ID: "has_software", Domain: "component", DescriptionDE: "Enthaelt Software", DescriptionEN: "Contains software"},
		{ID: "has_ai", Domain: "component", DescriptionDE: "Enthaelt KI-Modell", DescriptionEN: "Contains AI model"},
		{ID: "programmable", Domain: "component", DescriptionDE: "Programmierbar", DescriptionEN: "Programmable"},
		{ID: "networked", Domain: "component", DescriptionDE: "Vernetzt/Netzwerkfaehig", DescriptionEN: "Networked"},
		{ID: "wireless", Domain: "component", DescriptionDE: "Drahtlose Kommunikation", DescriptionEN: "Wireless communication"},
		{ID: "it_component", Domain: "component", DescriptionDE: "IT-Infrastruktur-Komponente", DescriptionEN: "IT infrastructure component"},
		{ID: "user_interface", Domain: "component", DescriptionDE: "Benutzerschnittstelle", DescriptionEN: "User interface"},
		{ID: "noise_source", Domain: "component", DescriptionDE: "Laermquelle", DescriptionEN: "Noise source"},
		{ID: "vibration_source", Domain: "component", DescriptionDE: "Vibrationsquelle", DescriptionEN: "Vibration source"},
		{ID: "radiation_risk", Domain: "component", DescriptionDE: "Strahlungsquelle", DescriptionEN: "Radiation source"},

		// ── Domain: energy (~15 tags) ───────────────────────────────────────
		{ID: "kinetic", Domain: "energy", DescriptionDE: "Kinetische Energie", DescriptionEN: "Kinetic energy"},
		{ID: "translational", Domain: "energy", DescriptionDE: "Translatorische Bewegung", DescriptionEN: "Translational motion"},
		{ID: "rotational", Domain: "energy", DescriptionDE: "Rotatorische Bewegung", DescriptionEN: "Rotational motion"},
		{ID: "potential", Domain: "energy", DescriptionDE: "Potentielle Energie", DescriptionEN: "Potential energy"},
		{ID: "gravitational", Domain: "energy", DescriptionDE: "Schwerkraftbedingt", DescriptionEN: "Gravitational"},
		{ID: "electrical_energy", Domain: "energy", DescriptionDE: "Elektrische Energie", DescriptionEN: "Electrical energy"},
		{ID: "hydraulic_pressure", Domain: "energy", DescriptionDE: "Hydraulischer Druck", DescriptionEN: "Hydraulic pressure"},
		{ID: "pneumatic_pressure", Domain: "energy", DescriptionDE: "Pneumatischer Druck", DescriptionEN: "Pneumatic pressure"},
		{ID: "thermal", Domain: "energy", DescriptionDE: "Thermische Energie", DescriptionEN: "Thermal energy"},
		{ID: "stored_energy", Domain: "energy", DescriptionDE: "Gespeicherte Energie", DescriptionEN: "Stored energy"},
		{ID: "radiation", Domain: "energy", DescriptionDE: "Strahlung", DescriptionEN: "Radiation"},
		{ID: "electromagnetic", Domain: "energy", DescriptionDE: "Elektromagnetische Strahlung", DescriptionEN: "Electromagnetic radiation"},
		{ID: "acoustic", Domain: "energy", DescriptionDE: "Schallenergie", DescriptionEN: "Acoustic energy"},
		{ID: "vibration", Domain: "energy", DescriptionDE: "Vibration", DescriptionEN: "Vibration"},
		{ID: "chemical", Domain: "energy", DescriptionDE: "Chemische Energie", DescriptionEN: "Chemical energy"},
		{ID: "magnetic", Domain: "energy", DescriptionDE: "Magnetische Energie", DescriptionEN: "Magnetic energy"},
		{ID: "cyber", Domain: "energy", DescriptionDE: "Cyber/Daten-Energie", DescriptionEN: "Cyber/data energy"},
		{ID: "ai_model", Domain: "energy", DescriptionDE: "KI-Modell", DescriptionEN: "AI model"},
		{ID: "ergonomic", Domain: "energy", DescriptionDE: "Ergonomische Belastung", DescriptionEN: "Ergonomic load"},

		// ── Domain: hazard (~20 tags) ───────────────────────────────────────
		{ID: "crush_risk", Domain: "hazard", DescriptionDE: "Quetschgefahr", DescriptionEN: "Crush risk"},
		{ID: "shear_risk", Domain: "hazard", DescriptionDE: "Schergefahr", DescriptionEN: "Shear risk"},
		{ID: "cut_risk", Domain: "hazard", DescriptionDE: "Schnittgefahr", DescriptionEN: "Cut risk"},
		{ID: "entanglement_risk", Domain: "hazard", DescriptionDE: "Einzugsgefahr", DescriptionEN: "Entanglement risk"},
		{ID: "impact_risk", Domain: "hazard", DescriptionDE: "Stossgefahr", DescriptionEN: "Impact risk"},
		{ID: "gravity_risk", Domain: "hazard", DescriptionDE: "Absturzgefahr / Herabfallen", DescriptionEN: "Fall/drop risk"},
		{ID: "pinch_point", Domain: "hazard", DescriptionDE: "Klemmstelle", DescriptionEN: "Pinch point"},
		{ID: "crush_point", Domain: "hazard", DescriptionDE: "Quetschstelle", DescriptionEN: "Crush point"},
		{ID: "electric_shock_risk", Domain: "hazard", DescriptionDE: "Stromschlaggefahr", DescriptionEN: "Electric shock risk"},
		{ID: "burn_risk", Domain: "hazard", DescriptionDE: "Verbrennungsgefahr", DescriptionEN: "Burn risk"},
		{ID: "pressure_risk", Domain: "hazard", DescriptionDE: "Druckgefahr", DescriptionEN: "Pressure risk"},
		{ID: "noise_risk", Domain: "hazard", DescriptionDE: "Laermgefahr", DescriptionEN: "Noise risk"},
		{ID: "vibration_risk", Domain: "hazard", DescriptionDE: "Vibrationsgefahr", DescriptionEN: "Vibration risk"},
		{ID: "ergonomic_risk", Domain: "hazard", DescriptionDE: "Ergonomie-Risiko", DescriptionEN: "Ergonomic risk"},
		{ID: "chemical_risk", Domain: "hazard", DescriptionDE: "Gefahrstoffrisiko", DescriptionEN: "Chemical risk"},
		{ID: "cyber_risk", Domain: "hazard", DescriptionDE: "Cyber-Sicherheitsrisiko", DescriptionEN: "Cyber security risk"},
		{ID: "ai_risk", Domain: "hazard", DescriptionDE: "KI-spezifisches Risiko", DescriptionEN: "AI-specific risk"},
		{ID: "software_risk", Domain: "hazard", DescriptionDE: "Software-Fehlerrisiko", DescriptionEN: "Software fault risk"},
		{ID: "communication_risk", Domain: "hazard", DescriptionDE: "Kommunikationsausfall-Risiko", DescriptionEN: "Communication failure risk"},
		{ID: "emc_risk", Domain: "hazard", DescriptionDE: "EMV-Stoerungsrisiko", DescriptionEN: "EMC interference risk"},

		// ── Extended hazard/component tags (press/forming machines) ─────────
		{ID: "person_under_load", Domain: "hazard", DescriptionDE: "Person unter schwebender Last", DescriptionEN: "Person under suspended load"},
		{ID: "two_hand_control_required", Domain: "component", DescriptionDE: "Zweihandbedienung erforderlich", DescriptionEN: "Two-hand control required"},
		{ID: "thermal_accumulation", Domain: "energy", DescriptionDE: "Waermeakkumulation ueber Zeit", DescriptionEN: "Thermal accumulation over time"},
		{ID: "mechanical_transmission", Domain: "component", DescriptionDE: "Mechanische Kraftuebertragung", DescriptionEN: "Mechanical power transmission"},
		{ID: "oil_mist_risk", Domain: "hazard", DescriptionDE: "Oelnebel-/Aerosol-Exposition", DescriptionEN: "Oil mist/aerosol exposure"},
		{ID: "rapid_energy_release", Domain: "energy", DescriptionDE: "Schlagartige Energiefreisetzung", DescriptionEN: "Rapid energy release"},
		{ID: "gravity_suspended_load", Domain: "hazard", DescriptionDE: "Schwebende Last unter Schwerkraft", DescriptionEN: "Suspended load under gravity"},
		{ID: "bypass_risk", Domain: "hazard", DescriptionDE: "Risiko der Sicherheitsumgehung", DescriptionEN: "Safety bypass risk"},

		// ── Extended: Cobot/Collaborative tags ──────────────────────────────
		{ID: "collaborative_operation", Domain: "component", DescriptionDE: "Kollaborierender Betrieb (Mensch und Maschine ohne Trennung)", DescriptionEN: "Collaborative operation (human-machine without separation)"},
		{ID: "force_limited", Domain: "component", DescriptionDE: "Kraft-/Geschwindigkeitsbegrenzung aktiv", DescriptionEN: "Force/speed limitation active"},
		{ID: "tool_at_robot", Domain: "component", DescriptionDE: "Werkzeug am Roboterarm montiert", DescriptionEN: "Tool mounted on robot arm"},
		{ID: "variable_workpiece", Domain: "component", DescriptionDE: "Wechselnde Werkstuecke (separate Beurteilung)", DescriptionEN: "Variable workpieces (separate assessment required)"},
		{ID: "afterrun_risk", Domain: "hazard", DescriptionDE: "Nachlaufgefahr nach Stopp", DescriptionEN: "Afterrun risk after stop"},

		// ── Domain: measure (~10 tags) ──────────────────────────────────────
		{ID: "guard_measure", Domain: "measure", DescriptionDE: "Trennende Schutzeinrichtung", DescriptionEN: "Separating guard measure"},
		{ID: "interlock_measure", Domain: "measure", DescriptionDE: "Verriegelungsmassnahme", DescriptionEN: "Interlock measure"},
		{ID: "force_limit_measure", Domain: "measure", DescriptionDE: "Kraftbegrenzungsmassnahme", DescriptionEN: "Force limiting measure"},
		{ID: "safety_function_measure", Domain: "measure", DescriptionDE: "Sicherheitsfunktion (STO/SLS/SOS)", DescriptionEN: "Safety function (STO/SLS/SOS)"},
		{ID: "software_safety_measure", Domain: "measure", DescriptionDE: "Software-Sicherheitsmassnahme", DescriptionEN: "Software safety measure"},
		{ID: "cyber_security_measure", Domain: "measure", DescriptionDE: "Cyber-Sicherheitsmassnahme", DescriptionEN: "Cyber security measure"},
		{ID: "pressure_relief_measure", Domain: "measure", DescriptionDE: "Druckentlastungsmassnahme", DescriptionEN: "Pressure relief measure"},
		{ID: "thermal_protection_measure", Domain: "measure", DescriptionDE: "Thermische Schutzmassnahme", DescriptionEN: "Thermal protection measure"},
		{ID: "ppe_measure", Domain: "measure", DescriptionDE: "Persoenliche Schutzausruestung", DescriptionEN: "Personal protective equipment"},
		{ID: "training_measure", Domain: "measure", DescriptionDE: "Schulungsmassnahme", DescriptionEN: "Training measure"},

		// ── Domain: evidence (~10 tags) ─────────────────────────────────────
		{ID: "design_evidence", Domain: "evidence", DescriptionDE: "Konstruktionsnachweis", DescriptionEN: "Design evidence"},
		{ID: "test_evidence", Domain: "evidence", DescriptionDE: "Testnachweis", DescriptionEN: "Test evidence"},
		{ID: "analysis_evidence", Domain: "evidence", DescriptionDE: "Analysenachweis", DescriptionEN: "Analysis evidence"},
		{ID: "inspection_evidence", Domain: "evidence", DescriptionDE: "Inspektionsnachweis", DescriptionEN: "Inspection evidence"},
		{ID: "cyber_evidence", Domain: "evidence", DescriptionDE: "Cyber-Security-Nachweis", DescriptionEN: "Cyber security evidence"},
		{ID: "simulation_evidence", Domain: "evidence", DescriptionDE: "Simulationsnachweis", DescriptionEN: "Simulation evidence"},
		{ID: "certification_evidence", Domain: "evidence", DescriptionDE: "Zertifizierungsnachweis", DescriptionEN: "Certification evidence"},
		{ID: "training_evidence", Domain: "evidence", DescriptionDE: "Schulungsnachweis", DescriptionEN: "Training evidence"},
		{ID: "operational_evidence", Domain: "evidence", DescriptionDE: "Betriebsnachweis", DescriptionEN: "Operational evidence"},
		{ID: "audit_evidence", Domain: "evidence", DescriptionDE: "Auditnachweis", DescriptionEN: "Audit evidence"},
	}
}

// ValidTagDomains returns the list of valid tag domains.
func ValidTagDomains() []string {
	return []string{"component", "energy", "hazard", "measure", "evidence"}
}
