# `MingaEditor.State.Picker`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/state/picker.ex#L1)

Groups picker-related fields from EditorState.

Tracks the current picker instance, the source module providing candidates,
the buffer index to restore on cancel, and the action-menu overlay state.

# `action_menu`

```elixir
@type action_menu() ::
  {[MingaEditor.UI.Picker.Source.action_entry()], non_neg_integer()} | nil
```

Action menu state: `{actions, selected_index}` or nil when closed.

# `t`

```elixir
@type t() :: %MingaEditor.State.Picker{
  action_menu: action_menu(),
  context: map() | nil,
  layout: MingaEditor.UI.Picker.Source.layout(),
  mode_prefix: String.t(),
  original_source: module() | nil,
  picker: MingaEditor.UI.Picker.t() | nil,
  restore: non_neg_integer() | nil,
  restore_theme: MingaEditor.UI.Theme.t() | nil,
  source: module() | nil
}
```

# `open?`

```elixir
@spec open?(t()) :: boolean()
```

Returns true if a picker is currently open.

# `update_picker`

```elixir
@spec update_picker(t(), MingaEditor.UI.Picker.t()) :: t()
```

Updates the inner `MingaEditor.UI.Picker` instance.

---

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