# `BB.TUI.Panels.Safety`
[🔗](https://github.com/mcass19/bb_tui/blob/v0.3.0/lib/bb/tui/panels/safety.ex#L1)

Safety panel — displays safety state, runtime state, and control hints.

Combines safety status indicator, runtime state, and keyboard shortcuts
in a single left-sidebar panel. When the robot is disarming, shows a
throbber animation.

Pure function — takes state, returns a widget struct.

# `render`

```elixir
@spec render(BB.TUI.State.t(), boolean()) :: struct()
```

Renders the safety panel with status indicator, runtime state, and key hints.

When the robot is in the `:disarming` state, returns a Throbber widget
instead to show the animated transition indicator.

## Examples

    iex> state = %BB.TUI.State{safety: %BB.TUI.State.Safety{state: :armed, runtime: :idle}}
    iex> %ExRatatui.Widgets.Paragraph{} = BB.TUI.Panels.Safety.render(state, true)

    iex> state = %BB.TUI.State{ui: %BB.TUI.State.UI{throbber_step: 0}, safety: %BB.TUI.State.Safety{state: :disarming, runtime: :disarming}}
    iex> %ExRatatui.Widgets.Throbber{} = BB.TUI.Panels.Safety.render(state, false)

---

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