# Client exports

## Example

***

{% code lineNumbers="true" fullWidth="false" %}

```lua
    exports['sl-shops']:OpenShop({
        name = 'Przykładowy Sklep',
        shop = {
            { label = 'Przykładowy Produkt', item = 'example_item', cost = 100, category = 'example_category' }
        },
        categories = {
            { name = 'example_category', icon = 'fa-solid fa-box', label = 'Przykładowa Kategoria' }
        }
    })
```

{% endcode %}

***

## Config Functions

<details>

<summary>Allowed Jobs ( Optional )</summary>

* **group `table`**&#x20;

```lua
group = { 'police', 'ambulance' },
```

</details>

***

<details>

<summary>Shop name <strong>( Require )</strong></summary>

* name `string`&#x20;

```lua
name = 'Sklep 24/7',
```

</details>

***

<details>

<summary><strong>Categories ( Require )</strong></summary>

* options `table`&#x20;
* options:
  * name `string`&#x20;
  * icon `string`  - <https://fontawesome.com/icons>
  * label `string`&#x20;

```lua
categories = {
            { name = 'food', icon = 'fa-solid fa-apple-alt', label = 'Food' },
            { name = 'drinks', icon = 'fa-solid fa-bottle-water', label = 'Napoje' },
            { name = 'tools', icon = 'fa-solid fa-tools', label = 'Narzędzia' },
            { name = 'electronics', icon = 'fa-solid fa-laptop', label = 'Elektronika' },
},
```

</details>

***

<details>

<summary>Products <strong>( Require )</strong></summary>

* options `table`&#x20;
* options:
  * label `string`&#x20;
  * item `string`&#x20;
  * category `string` - Category with Categories table
  * metadata `table`&#x20;
    * license  `string`&#x20;
    * SOON MORE **( tell us what we can add )**

```lua
shop = {
            { label = 'Pistolet', item = 'weapon_pistol', cost = 2500, category = 'weapons', metadata = { license = 'weapon'} },
},
```

</details>
