# `PhoenixKit.Notifications.Render`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.164/lib/phoenix_kit/notifications/render.ex#L1)

Human-readable rendering for notifications.

Maps `{activity.action, activity.metadata}` → `%{icon, text, link, actor_uuid}`
so the bell dropdown and inbox page don't need to know the action taxonomy.

Unknown actions fall back to the raw action string with a generic icon, so a
new action that hasn't been mapped yet still displays safely.

# `render_result`

```elixir
@type render_result() :: %{
  icon: String.t(),
  text: String.t(),
  link: String.t() | nil,
  actor_uuid: String.t() | nil
}
```

# `render`

```elixir
@spec render(PhoenixKit.Notifications.Notification.t(), String.t() | nil) ::
  render_result()
```

Returns the display payload for a notification.

`notification.activity` must be preloaded. `locale` is the recipient's current
locale (base code, e.g. `"en"`); it's threaded into the built link so the
click-through lands on the right locale-prefixed path. When `nil`, link
building falls back to `Routes.path`'s `determine_locale/0` (the process
Gettext locale) — used by callers that don't track a locale (e.g. the admin
inbox). The metadata `notification_link` override is returned verbatim and is
expected to already be prefix/locale-correct (built via `Routes.path/1`).

---

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