# Text UI

## Exports

### Show Text UI

```lua
exports.ls_textui:showTextUI()

params: [
    data: table [
        id: 'string',
        icon: 'string',
        key: 'string'
        message: 'string',
    ]
]

Example:
exports.ls_textui:showTextUI({{id = 'clothing_store', key = 'E', message = 'Open clothing store'}})
exports.ls_textui:showTextUI({{id = 'clothing_store', icon = 'far fa-basket-shopping-simple', message = 'Open clothing store'}})

You can use a key like 'E' or an icon like 'far fa-car', but only font awesome icons are supported.
```

### Hide Text UI

```lua
Support two type, string or table,

If you have only one text UI that you want to hide, you can simply use a string to hide it.
exports.ls_textui:hideTextUI('clothing_store')

If you have more than one text UI, you can use a table format and list them one after another, like this:
exports.ls_textui:hideTextUI({'example_1', 'example_2', 'example_3'})
```

### Get Text UI's

<pre class="language-lua"><code class="lang-lua">local retreval = exports.ls_textui:getTextUIs()

<strong>This export returns the currently available text UIs. 
</strong><strong>If there are no active text UIs, it will return false.
</strong></code></pre>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://los-santos-project.gitbook.io/project-los-santos-scripts/scripts/text-ui.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
