# nova\_notify

NOVA Framework notification system. Provides toast-style notifications for user feedback across all scripts.

## Features

* **Toast Notifications** — Non-intrusive popup notifications
* **Multiple Types** — Success, error, info, warning styles
* **Custom Duration** — Configurable display time
* **Dark Theme** — Consistent with NOVA's UI design

## Exports

| Export             | Parameters                     | Description                         |
| ------------------ | ------------------------------ | ----------------------------------- |
| `ShowNotification` | `message`, `type`, `duration?` | Show a notification (client)        |
| `SendNotification` | `message`, `type`, `duration?` | Alias for ShowNotification (client) |

### Notification Types

| Type      | Color         | Use Case               |
| --------- | ------------- | ---------------------- |
| `success` | Green         | Successful actions     |
| `error`   | Red           | Errors and failures    |
| `info`    | Blue          | Informational messages |
| `warning` | Yellow/Orange | Warnings               |

## Usage Examples

### From client script

```lua
exports['nova_notify']:ShowNotification('Item added to inventory', 'success')
exports['nova_notify']:ShowNotification('Not enough money', 'error', 5000)
```

### From server (via event)

```lua
TriggerClientEvent('nova:client:notify', source, 'Purchase complete!', 'success')
```

### With custom duration

```lua
exports['nova_notify']:ShowNotification('Processing...', 'info', 10000)  -- 10 seconds
```

## Dependencies

* None — This is a standalone resource

## Notes

* Default notification duration is 3 seconds
* Notifications stack vertically (multiple can show at once)
* The NUI uses CSS animations for smooth enter/exit
* Used by most NOVA scripts for user feedback
* Can be used as a replacement for default FiveM notifications
