package domain

// Product-fit scoring is deliberately a small exported contract so the
// deterministic scorer and later AI judge cannot silently drift in weights.
const (
	ProductFitPainWeight       = 35
	ProductFitScenarioWeight   = 25
	ProductFitAudienceWeight   = 20
	ProductFitCapabilityWeight = 20
	ProductFitEligibleMinScore = 45
)

var ProductFitDimensionOrder = []string{
	ProductFitPain,
	ProductFitScenario,
	ProductFitAudience,
	ProductFitCapability,
}

func ProductFitDimensionWeight(dimension string) int {
	switch dimension {
	case ProductFitPain:
		return ProductFitPainWeight
	case ProductFitScenario:
		return ProductFitScenarioWeight
	case ProductFitAudience:
		return ProductFitAudienceWeight
	case ProductFitCapability:
		return ProductFitCapabilityWeight
	default:
		return 0
	}
}

// ProductFitEligible is the single definition of "worth surfacing": enough
// total score, at least one pain or scenario hit, and not excluded.
func ProductFitEligible(score int, painOrScenario, excluded bool) bool {
	return score >= ProductFitEligibleMinScore && painOrScenario && !excluded
}
