# NOTIFICATIONS

1. Send Notification

{% tabs %}
{% tab title="Server Side" %}

* title `string`
* time `string`
* text `string`
* timeout? `number`
* type? `number`
* playerId `number`

```lua
TriggerClientEvent('piotreq_phone:SendNotification', playerId, {
    title = 'New message',
    time = os.date('%H:%M', os.time()),
    text = 'Location GPS',
    timeout = 4000, -- optional
    type = 'default' -- optional
})
```

{% endtab %}

{% tab title="Client SIde" %}

* title `string`
* time `string`
* text `string`
* timeout? `number`
* type? `number`

```lua
exports['piotreq_phone']:SendNotification({
    title = 'New message',
    time = 'Right now',
    text = 'Location GPS',
    timeout = 4000, -- optional
    type = 'default' -- optional, you can check types in css
})

TriggerEvent('piotreq_phone:SendNotification', {
    title = 'New message',
    time = 'Right now',
    text = 'Location GPS',
    timeout = 4000, -- optional
    type = 'default' -- optional
})
```

{% endtab %}
{% endtabs %}

2. Send Request

{% tabs %}
{% tab title="Server Side" %}

* text `string`
* name `string`
* type? `string`
* buttons `table`
* playerId `number`
* args `any`

```lua
TriggerClientEvent('piotreq_phone:SendRequest', playerId, {
    text = 'Invoice',
    name = 'UwU Cafe',
    type = 'pink', -- optional, you can check types in css
    buttons = {
        {
            type = 'light', 
            event = 'piotreq_uwucafe:PayBill',
            args = {amount = 100, id = playerId}, 
            icon = 'fa-solid fa-check'
        },
        {
            type = 'red', 
            event = 'piotreq_uwucafe:CancelBill',
            icon = 'fa-solid fa-xmark'
        },
    }
})
```

{% endtab %}

{% tab title="Client Side" %}

* text `string`
* name `string`
* type? `string`
* buttons `table`
* event? `string`
* eventType? `string`
* args `any`
* icon `string`&#x20;

```lua
TriggerEvent('piotreq_phone:SendRequest', {
    text = 'Invoice',
    name = 'UwU Cafe',
    type = 'pink', -- optional, you can check types in css
    buttons = {
        {
            type = 'light', 
            event = 'piotreq_uwucafe:PayBill',
            eventType = 'server',
            args = {amount = 100}, 
            icon = 'fa-solid fa-check'
        },
        {
            type = 'red', 
            event = 'piotreq_uwucafe:CancelBill',
            icon = 'fa-solid fa-xmark'
        },
    }
})
```

{% endtab %}
{% endtabs %}
