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

Ordered collection of active editor notifications.

The editor owns this model. Frontends receive full snapshots and report user actions back by notification id and action id.

# `t`

```elixir
@type t() :: %MingaEditor.UI.NotificationCenter{
  items: [MingaEditor.UI.Notification.t()]
}
```

# `action`

```elixir
@spec action(t(), String.t(), String.t()) ::
  MingaEditor.UI.Notification.Action.t() | nil
```

Finds an inline action on a notification.

# `dismiss`

```elixir
@spec dismiss(t(), String.t()) :: t()
```

Dismisses one notification without affecting unrelated notifications.

# `dismiss`

```elixir
@spec dismiss(t(), String.t(), reference()) :: t()
```

Dismisses only when the notification's stored timer ref matches.

# `find`

```elixir
@spec find(t(), String.t()) :: MingaEditor.UI.Notification.t() | nil
```

Finds a notification by id.

# `list`

```elixir
@spec list(t()) :: [MingaEditor.UI.Notification.t()]
```

Returns notifications in display order, oldest first.

# `new`

```elixir
@spec new() :: t()
```

Creates an empty notification center.

# `update`

```elixir
@spec update(t(), MingaEditor.UI.Notification.t()) :: t()
```

Updates an existing notification or inserts a new one when the id is unknown.

# `upsert`

```elixir
@spec upsert(t(), MingaEditor.UI.Notification.t()) :: t()
```

Adds or replaces a notification by id while preserving its original position.

---

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