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

Modal-overlay payload for the picker variant.

Wraps the existing `MingaEditor.State.Picker` struct with the metadata the
ModalOverlay sum type carries for every variant: `opened_at` (monotonic
millisecond timestamp) and `owner` (a tag identifying the lifecycle scope
the modal belongs to).

The picker is global UX, so `owner` defaults to `:global`. It is included
here for API uniformity with the per-tab variants (`Completion`,
`Conflict`).

# `owner`

```elixir
@type owner() :: term()
```

# `t`

```elixir
@type t() :: %MingaEditor.State.ModalOverlay.Picker{
  opened_at: integer(),
  owner: owner(),
  picker_ui: MingaEditor.State.Picker.t()
}
```

# `new`

```elixir
@spec new(
  MingaEditor.State.Picker.t(),
  keyword()
) :: t()
```

Builds a picker payload wrapping the given `picker_ui` state.

The optional `:owner` keyword defaults to `:global`. The optional
`:opened_at` keyword defaults to `System.monotonic_time(:millisecond)`.

# `put_picker_ui`

```elixir
@spec put_picker_ui(t(), MingaEditor.State.Picker.t()) :: t()
```

Replaces the inner `picker_ui` state on the payload, preserving `owner`
and `opened_at`. This is the only sanctioned way to update the inner
state from outside this module (Rule 2: state ownership).

---

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