# Usage

### Export Usage

All exports are available to any client-side script once `auzzie_notify` is running. No additional setup is required.

#### Signatures

```lua
exports['auzzie_notify']:Notify(type, message, position?, duration?)
exports['auzzie_notify']:Success(message, position?, duration?)
exports['auzzie_notify']:Error(message, position?, duration?)
exports['auzzie_notify']:Warning(message, position?, duration?)
exports['auzzie_notify']:Info(message, position?, duration?)
```

#### Parameters

| Parameter  | Type     | Required          | Description                                                 |
| ---------- | -------- | ----------------- | ----------------------------------------------------------- |
| `type`     | `string` | ✅ (`Notify` only) | One of `'success'`, `'error'`, `'warning'`, `'info'`        |
| `message`  | `string` | ✅                 | The text content displayed inside the toast                 |
| `position` | `string` | ❌                 | Screen position. Omit to use `Config.Position`              |
| `duration` | `number` | ❌                 | Display time in milliseconds. Omit to use `Config.Duration` |

#### Client-Side Examples

```lua
-- Type-specific shortcuts
exports['auzzie_notify']:Success('Membership purchased!')
exports['auzzie_notify']:Error('You cannot afford that.')
exports['auzzie_notify']:Warning('Your boost is about to expire.')
exports['auzzie_notify']:Info('The gym opens at 08:00.')

-- With a position override
exports['auzzie_notify']:Success('Changes saved.', 'top-right')
exports['auzzie_notify']:Error('Insufficient funds.', 'top-left')

-- With a position and custom duration
exports['auzzie_notify']:Warning('Boost expiring soon!', 'bottom-right', 8000)

-- Full Notify call with all parameters
exports['auzzie_notify']:Notify('info', 'Welcome back.', 'bottom', 4000)

-- Position omitted — falls back to Config.Position
exports['auzzie_notify']:Info('Connected to the server.')
```

#### Server-Side Triggering

To fire a notification on a specific client from a server-side script, use `TriggerClientEvent` with the `auzzie_notify:notify` event.

```lua
-- server/server.lua
TriggerClientEvent('auzzie_notify:client', source, 'success', 'Purchase complete!', 'top-right')
TriggerClientEvent('auzzie_notify:client', source, 'error', 'Insufficient funds.', 'top-left', 8000)
```

**Event signature:**

```
'auzzie_notify:client'  →  type, message, position?, duration?
```

### NUI / Positioning

#### Position Reference

Each notification call accepts its own independent position, allowing toasts to appear in multiple screen zones simultaneously. The `MaxNotifications` limit is enforced per zone, not globally.

| Value          | Location                 |
| -------------- | ------------------------ |
| `top`          | Top center               |
| `top-left`     | Top left corner          |
| `top-right`    | Top right corner         |
| `bottom`       | Bottom center            |
| `bottom-left`  | Bottom left corner       |
| `bottom-right` | Bottom right corner      |
| `left`         | Middle of the left edge  |
| `right`        | Middle of the right edge |

If an unrecognised position string is passed, a warning is printed to the client console and the notification falls back to `Config.Position`.
