# `Mobus.Stepwise.Components.StepwiseProjection`
[🔗](https://github.com/fosferon/mobus_stepwise/blob/main/lib/mobus/stepwise/components/stepwise_projection.ex#L1)

Projection component for stepwise workflows.

Produces canonical `Mobus.Stepwise.Projection` from the current runtime state.

# `call`

```elixir
@spec call(map(), map()) :: map()
```

Builds the canonical `Mobus.Stepwise.Projection` from the current runtime.

This is an ALF pipeline stage. Computes the projection struct containing
all information needed for UI rendering: current state, available events,
UI descriptor, artifacts, blocked reasons, subscriptions, errors, and trace.

Available events are derived from the step's position in the ordered step list:
- First step: `[:next]`
- Last step: `[:back]`
- Middle steps: `[:back, :next]`

## Parameters

  * `event` — pipeline event map with `:spec` and `:runtime`
  * `opts` — ALF stage options (unused)

## Returns

  * Updated event map with `%Mobus.Stepwise.Projection{}` in both
    `event.runtime.projection` and `event.projection`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
