package action import ( "github.com/cnachtigall/heatwave-autopilot/internal/heat" "github.com/cnachtigall/heatwave-autopilot/internal/risk" ) // TimelineSlot represents one hour in a 24-hour plan. type TimelineSlot struct { Hour int Actions []Action TempC float64 RiskLevel risk.RiskLevel BudgetStatus heat.BudgetStatus } // BuildTimeline creates a 24-slot timeline from hourly contexts and available actions. func BuildTimeline(contexts []HourContext, actions []Action) []TimelineSlot { slots := make([]TimelineSlot, len(contexts)) for i, ctx := range contexts { slots[i] = TimelineSlot{ Hour: ctx.Hour, TempC: ctx.TempC, RiskLevel: ctx.RiskLevel, BudgetStatus: ctx.BudgetStatus, Actions: SelectActions(actions, ctx), } } return slots }