> For the complete documentation index, see [llms.txt](https://horizon-scripts.gitbook.io/horizon-scripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://horizon-scripts.gitbook.io/horizon-scripts-docs/horizonphone/client-exports.md). Agents can also search and read this documentation through its [MCP server](https://horizon-scripts.gitbook.io/horizon-scripts-docs/~gitbook/mcp).

# Client Exports

Call client exports from another client resource with `exports['HorizonPhone']:ExportName(...)`.

## IsOpen

Returns whether the phone UI is open.

**Arguments:** none · **Returns:** boolean

```lua
local open = exports['HorizonPhone']:IsOpen()
```

## IsClosed

Returns whether the phone UI is closed.

**Arguments:** none · **Returns:** boolean

```lua
if exports['HorizonPhone']:IsClosed() then
    -- Phone is closed.
end
```

## Open

Opens the phone. `itemName` is optional for item-based configurations.

```lua
exports['HorizonPhone']:Open('phone')
```

## UsePhoneItem

Processes an inventory item interaction. The server validates the item.

| Argument   | Type  | Description         |
| ---------- | ----- | ------------------- |
| `itemData` | table | Item data           |
| `slotData` | table | Inventory slot data |

```lua
exports['HorizonPhone']:UsePhoneItem(itemData, slotData)
```

## Close

Closes the phone and returns `true`.

```lua
exports['HorizonPhone']:Close()
```

## Toggle

Toggles the phone and returns the resulting open state.

```lua
local open = exports['HorizonPhone']:Toggle('phone')
```

## SetDisabled

Disables or enables phone opening.

| Argument       | Type    | Description                  |
| -------------- | ------- | ---------------------------- |
| `disabled`     | boolean | Disable phone opening        |
| `closeIfOpen?` | boolean | Close it immediately if open |

```lua
exports['HorizonPhone']:SetDisabled(true, true)
```

## IsDisabled

Returns whether phone opening is disabled.

```lua
local disabled = exports['HorizonPhone']:IsDisabled()
```

## IsInCamera

Returns whether the camera is active.

```lua
local cameraOpen = exports['HorizonPhone']:IsInCamera()
```

## RegisterVehicleKeysBridge

Registers a client-side key adapter.

| Argument | Type   | Description                                        |
| -------- | ------ | -------------------------------------------------- |
| `id`     | string | Unique bridge identifier                           |
| `bridge` | table  | `resourceName`, `priority`, and `giveKeys` handler |

```lua
exports['HorizonPhone']:RegisterVehicleKeysBridge('my-keys', {
    resourceName = 'my-vehicle-keys',
    priority = 100,
    giveKeys = function(vehicle, plate)
        return true
    end
})
```
