# `MingaEditor.Frontend.Selection`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/frontend/selection.ex#L1)

Resolves which terminal renderer implementation Minga launches.

Go/Bubble Tea is the only terminal frontend. The legacy Zig renderer was
removed in #2223; `MINGA_FRONTEND=go` is the default and the only accepted
value. Any other value (including `zig`) is an error: the launch path raises
instead of silently falling back, so a typo never quietly boots the wrong
renderer.

This is the single source of truth for the terminal renderer choice. The
`Frontend.Manager` (runtime binary path) and the `MingaGoTui` compiler (which
renderer to build) both read from here.

# `tui_impl`

```elixir
@type tui_impl() :: :go
```

Terminal renderer implementation.

# `env_var`

```elixir
@spec env_var() :: String.t()
```

Returns the name of the selection environment variable.

# `renderer_binary_name`

```elixir
@spec renderer_binary_name(tui_impl()) :: String.t()
```

Returns the runtime binary name for the given implementation.

# `tui_impl`

```elixir
@spec tui_impl() :: tui_impl()
```

Returns the configured terminal renderer implementation.

Resolution order:

  1. The `MINGA_FRONTEND` environment variable (only `"go"` is valid).
  2. The `:tui_impl` application env (an atom or string), for tests.
  3. The default, `:go`.

Raises `ArgumentError` when `MINGA_FRONTEND` is set to anything other than
`"go"`.

---

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