package iace

// collectAllPatterns gathers hazard patterns from all registered sources.
// This function is called by NewPatternEngine() to build the complete pattern set.
// New pattern sources are registered here.
func collectAllPatterns() []HazardPattern {
	patterns := GetBuiltinHazardPatterns()                            // HP001-HP044
	patterns = append(patterns, GetExtendedHazardPatterns()...)       // HP045+ from rule library
	patterns = append(patterns, GetPressHazardPatterns()...)          // HP045-HP058 press-specific
	patterns = append(patterns, GetCobotHazardPatterns()...)          // HP059-HP065 cobot-specific
	patterns = append(patterns, GetOperationalHazardPatterns()...)    // HP066-HP093 operational states
	patterns = append(patterns, GetDGUVExtendedPatterns()...)         // HP094-HP133 DGUV themes
	patterns = append(patterns, GetExtendedHazardPatterns2()...)      // HP134-HP173 additional hazards
	patterns = append(patterns, GetElevatorPatterns()...)             // HP174-HP198 elevator/lift
	patterns = append(patterns, GetAGVAgriPatterns()...)              // HP199-HP228 AGV + agricultural
	patterns = append(patterns, GetFoodProcessingPatterns()...)       // HP300-HP319 food processing
	patterns = append(patterns, GetPackagingPatterns()...)            // HP320-HP334 packaging machines
	patterns = append(patterns, GetLaserPatterns()...)                // HP335-HP349 laser machines
	patterns = append(patterns, GetMedicalDevicePatterns()...)        // HP350-HP364 medical devices (IEC 60601)
	patterns = append(patterns, GetPressureEquipmentPatterns()...)    // HP365-HP374 pressure equipment
	patterns = append(patterns, GetConstructionPatterns()...)         // HP400-HP419 construction/crane
	patterns = append(patterns, GetForestryConveyorPatterns()...)     // HP420-HP450 forestry/conveyor
	patterns = append(patterns, GetPlasticsMetalPatterns()...)        // HP500-HP529 plastics + metalworking
	patterns = append(patterns, GetWeldingGlassTextilePatterns()...)  // HP530-HP559 welding + glass + textile
	patterns = append(patterns, GetSpecificMachinePatterns()...)      // HP730-HP755 pressure/wind/solar/battery
	patterns = append(patterns, GetSpecificMachinePatterns2()...)     // HP756-HP784 escalator/pool/playground/fitness/laundry/glass
	patterns = append(patterns, GetCyberExtendedPatterns()...)        // HP800-HP829 software faults/cyber-security
	patterns = append(patterns, GetCyberExtendedPatterns2()...)       // HP830-HP844 AI-ML specific
	patterns = append(patterns, GetCyberExtendedPatterns3()...)       // HP845-HP864 network/communication + HMI
	patterns = append(patterns, GetWorkshopPatterns()...)             // HP600-HP664 cross-machine workshop
	patterns = append(patterns, GetMaintenanceExtPatterns()...)       // HP700-HP729,HP900-HP934 maintenance lifecycle
	patterns = append(patterns, GetFinalPatternsA()...)               // HP1000-HP1084 mechanical body-part variants
	patterns = append(patterns, GetFinalPatternsB()...)               // HP1085-HP1169 electrical/thermal/chemical/bio/radiation
	patterns = append(patterns, GetFinalPatternsC()...)               // HP1170-HP1254 software/control/org/ergonomic/fire
	patterns = append(patterns, GetFinalPatternsD()...)               // HP1255-HP1335 lifecycle/special situations
	patterns = append(patterns, GetCNCHazardPatterns()...)            // HP1400-HP1419 CNC/metalworking part 1 (Phase 3)
	patterns = append(patterns, GetCNCHazardPatternsExt()...)         // HP1420-HP1434 CNC/metalworking part 2 (Phase 3)
	patterns = append(patterns, GetVDMAIndustryPatterns()...)         // HP1500-HP1549 VDMA sectors (Phase 3)
	patterns = append(patterns, GetTextileAgriPatterns()...)          // HP1550-HP1584 Textile + Agri (Phase 5)
	patterns = append(patterns, GetRobotCellPatterns()...)            // HP1600-HP1649 Robot cell (GT benchmark)
	patterns = append(patterns, GetRobotCellPatternsExt()...)        // HP1650-HP1699 Robot cell extended (GT gaps)
	patterns = append(patterns, GetGTBremseHazardPatterns()...)       // HP1710-HP1729 GT Bremse coverage gaps
	patterns = append(patterns, GetISO12100GapPatterns()...)          // HP1900-HP1909 ISO 12100 Annex B gaps (Vakuum, Federn, Rutsch, Hochdruckinjektion, Ersticken)
	patterns = append(patterns, GetCRAPatterns()...)                  // HP1910-HP1918 CRA / DIN EN 40000-1-2 cyber-resilience spur
	patterns = append(patterns, GetSecondaryHarmDemoPatterns()...)    // HP2000-HP2001 secondary harm chain demos (Cola splitter, Pharma)
	patterns = append(patterns, GetLiftEndstopPatterns()...)          // HP2100-HP2102 lift body-part crush at endstops
	patterns = append(patterns, GetWarewashingPatterns()...)          // HP2200-HP2206 commercial dishwasher (scald/chemical/door/slip)
	patterns = applyMachineTypeOverrides(patterns)                    // Fill MachineTypes on legacy patterns to prevent drift
	patterns = applyDomainGates(patterns)                             // Capability-domain gate: stop domain-specific patterns leaking cross-machine
	return patterns
}
