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

Modal-overlay payload for the prompt variant.

Wraps the existing `MingaEditor.State.Prompt` struct with the metadata the
ModalOverlay sum type carries for every variant: `opened_at` (monotonic
millisecond timestamp) and `owner`. Prompts are global UX, so `owner`
defaults to `:global`.

# `owner`

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

# `t`

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

# `new`

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

Builds a prompt payload wrapping the given `prompt_ui` state.

# `put_prompt_ui`

```elixir
@spec put_prompt_ui(t(), MingaEditor.State.Prompt.t()) :: t()
```

Replaces the inner `prompt_ui` state on the payload, preserving `owner`
and `opened_at`. 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*
