# `MingaEditor.UI.Notification`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/ui/notification.ex#L1)

BEAM-owned model for structured editor notifications.

Native GUI frontends render these as bottom-right notification cards. TUI users receive the same important information through `*Messages*` at the call site.

# `level`

```elixir
@type level() :: :info | :warning | :error | :success | :progress
```

# `t`

```elixir
@type t() :: %MingaEditor.UI.Notification{
  actions: [MingaEditor.UI.Notification.Action.t()],
  auto_dismiss_ms: non_neg_integer() | nil,
  body: String.t() | nil,
  created_at: integer(),
  dismiss_ref: reference() | nil,
  dismissable: boolean(),
  id: String.t(),
  level: level(),
  source: String.t() | nil,
  title: String.t(),
  updated_at: integer() | nil
}
```

# `new`

```elixir
@spec new(keyword() | map()) :: t()
```

Builds a notification from attrs.

# `update`

```elixir
@spec update(t(), keyword() | map()) :: t()
```

Returns a copy updated with attrs while preserving creation time.

# `with_created_at`

```elixir
@spec with_created_at(t(), integer()) :: t()
```

Sets the original creation timestamp when replacing an existing notification.

# `with_dismiss_ref`

```elixir
@spec with_dismiss_ref(t(), reference() | nil) :: t()
```

Attaches the auto-dismiss timer reference used to reject stale timer messages.

# `with_updated_at`

```elixir
@spec with_updated_at(t(), integer()) :: t()
```

Sets the recency timestamp for a notification snapshot or replacement.

---

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