# useNotifications API

> Auto-generated API reference for `useNotifications` from @vuetify/v0 (Vuetify0).
> Source of truth: https://0.vuetifyjs.com/api/use-notifications

## Related

- https://0.vuetifyjs.com/composables/plugins/use-notifications
- https://0.vuetifyjs.com/components/semantic/snackbar
- https://0.vuetifyjs.com/composables/registration/create-registry
- https://0.vuetifyjs.com/composables/registration/create-queue
- https://0.vuetifyjs.com/composables/foundation/create-plugin

## Functions

### createNotifications

```ts
(_options?: NotificationsOptions) => NotificationsContext<NotificationTicketInput, NotificationTicket<NotificationTicketInput>>
```

### createNotificationsContext

```ts
<_E>(_options?: NotificationsPluginOptions | undefined) => ContextTrinity<_E>
```

### createNotificationsPlugin

```ts
(_options?: NotificationsPluginOptions | undefined) => Plugin
```

### useNotifications

```ts
<_E>(namespace?: string) => _E
```

## Options

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| `events` | `boolean \| undefined` | `false` | no | Enable event emission for registry operations |
| `reactive` | `boolean \| undefined` | `false` | no | Enable reactive behavior for registry operations |
| `timeout` | `number \| undefined` | `3000` | no | Default auto-dismiss timeout in ms for the toast queue. |

## Methods

| Name | Type | Description |
|---|---|---|
| `clear` | `() => void` | Clear the entire registry |
| `has` | `(id: ID) => boolean` | Check if a ticket exists by ID |
| `keys` | `() => readonly ID[]` | Get all registered IDs |
| `browse` | `(value: E["value"]) => readonly ID[] \| undefined` | Browse for an ID(s) by value |
| `lookup` | `(index: number) => ID \| undefined` | Lookup a ticket by index number |
| `get` | `(id: ID) => E \| undefined` | Get a ticket by ID |
| `upsert` | `(id: ID, ticket?: Partial<Z>, event?: string) => E` | Update or insert a ticket by ID |
| `values` | `() => readonly E[]` | Get all values of registered tickets |
| `entries` | `() => readonly [ID, E][]` | Get all entries of registered tickets |
| `register` | `(ticket?: Partial<Z & RegistryTicket>) => E` | Register a new ticket |
| `unregister` | `(id: ID) => void` | Unregister a ticket by ID |
| `reindex` | `() => void` | Reset the index directory and update all tickets |
| `move` | `(id: ID, toIndex: number) => E \| undefined` | Move a ticket to a new index position |
| `reorder` | `(ids: ID[]) => void` | Reorder the registry to match a canonical permutation of ids in one pass. |
| `seek` | `(direction?: "first" \| "last", from?: number, predicate?: (ticket: E) => boolean) => E \| undefined` | Seek for a ticket based on direction and optional predicate |
| `on` | `<K extends Extensible<RegistryEventName>>(event: K, cb: RegistryEventCallback<E, K>) => void` | Listen for registry events |
| `off` | `<K extends Extensible<RegistryEventName>>(event: K, cb: RegistryEventCallback<E, K>) => void` | Stop listening for registry events |
| `emit` | `<K extends Extensible<RegistryEventName>>(event: K, data: EventPayload<E, K>) => void` | Emit an event with data |
| `dispose` | `() => void` | Clears the registry and removes all listeners |
| `onboard` | `(registrations: Partial<Z & RegistryTicket>[]) => E[]` | Onboard multiple tickets at once |
| `offboard` | `(ids: ID[]) => Partial<Z>[]` | Offboard multiple tickets at once, returning the input shapes that were removed. |
| `batch` | `<R>(fn: () => R) => R` | Execute operations in a batch, deferring cache invalidation and event emission until complete |
| `send` | `(input: Z) => E` | Create a notification and enqueue for toast display. |
| `read` | `(id: ID) => void` | Mark as read. Emits `notification:read`. |
| `unread` | `(id: ID) => void` | Mark as unread. Emits `notification:unread`. |
| `seen` | `(id: ID) => void` | Mark as seen. Emits `notification:seen`. |
| `archive` | `(id: ID) => void` | Archive. Emits `notification:archived`. |
| `unarchive` | `(id: ID) => void` | Restore from archive. Emits `notification:unarchived`. |
| `snooze` | `(id: ID, until: Date) => void` | Snooze until the given time. Emits `notification:snoozed`. |
| `wake` | `(id: ID) => void` | Cancel snooze. Emits `notification:unsnoozed`. |
| `readAll` | `() => void` | Mark all unread notifications as read. |
| `archiveAll` | `() => void` | Archive all unarchived notifications. |

## Properties

| Name | Type | Description |
|---|---|---|
| `collection` | `ReadonlyMap<ID, E>` | The collection of tickets in the registry |
| `size` | `number` | The number of tickets in the registry |
| `queue` | `QueueContext<import("/home/runner/work/0/0/packages/0/src/composables/createQueue/index").QueueTicketInput<unknown>, import("/home/runner/work/0/0/packages/0/src/composables/createQueue/index").QueueTicket<import("/home/runner/work/0/0/packages/0/src/composables/createQueue/index").QueueTicketInput<unknown>>>` | The toast display queue. Access `queue.values()`, `queue.pause()`, `queue.resume()`. |
