package redfishprofile

func amiProfile() Profile {
	return staticProfile{
		name:            "ami-family",
		priority:        10,
		safeForFallback: true,
		matchFn: func(s MatchSignals) int {
			score := 0
			if containsFold(s.ServiceRootVendor, "ami") || containsFold(s.ServiceRootProduct, "ami") {
				score += 70
			}
			for _, ns := range s.OEMNamespaces {
				if containsFold(ns, "ami") {
					score += 30
					break
				}
			}
			return min(score, 100)
		},
		extendAcquisition: func(plan *AcquisitionPlan, _ MatchSignals) {
			addPlanPaths(&plan.SeedPaths,
				"/redfish/v1/Oem/Ami",
				"/redfish/v1/Oem/Ami/InventoryData/Status",
			)
			ensurePrefetchEnabled(plan, true)
			addPlanNote(plan, "ami-family acquisition extensions enabled")
		},
		applyAnalysisDirectives: func(d *AnalysisDirectives, _ MatchSignals) {
			d.EnableGenericGraphicsControllerDedup = true
		},
	}
}
