package framework

const PhasedComponentScalerV2IdStr PhasedComponentScalerType = "PhasedComponentScalerV2"

// ComponentScalerResult captures the full decision from a V2 component scaler:
// the desired topology and an optional action to execute.
type ComponentScalerResult struct {
	// DesiredReplicas is the target replica count for this component.
	DesiredReplicas uint
	// TopologyChanged is true if DesiredReplicas differs from current.
	TopologyChanged bool
	// Action is an optional scale action to execute (e.g. ExpandDisk, ExpandIOPS).
	// nil means no action beyond the topology change.
	Action *ScaleAction
}

// PhasedComponentScalerV2 is the V2 component scaler interface. Unlike V1
// which only returns a new replica count, V2 returns a full decision that
// can express both topology changes and action-only operations.
type PhasedComponentScalerV2 interface {
	PullNewComponentDecision(current ClusterComponentV1) (*ComponentScalerResult, error)
}
