package ostate

import "github.com/tech/sendico/payments/orchestrator/internal/service/orchestrationv2/agg"

var aggregateTransitions = map[agg.State]map[agg.State]struct{}{
	agg.StateUnspecified: {
		agg.StateCreated: {},
	},
	agg.StateCreated: {
		agg.StateExecuting: {},
		agg.StateFailed:    {},
	},
	agg.StateExecuting: {
		agg.StateNeedsAttention: {},
		agg.StateSettled:        {},
		agg.StateFailed:         {},
	},
	agg.StateNeedsAttention: {
		agg.StateExecuting: {},
		agg.StateSettled:   {},
		agg.StateFailed:    {},
	},
	agg.StateSettled: {},
	agg.StateFailed:  {},
}

var aggregateTerminalStates = map[agg.State]struct{}{
	agg.StateSettled: {},
	agg.StateFailed:  {},
}
