<script>
	import Callout from '$lib/components/Callout.svelte';
</script>

dd-cards publishes two client exports. Both exist so ox_inventory can call something when a player
uses an item — they are not a general-purpose API.

## `useCardBox`

```lua
exports['dd-cards']:useCardBox()
```

Opens a `business_card_box` and takes one card out of it, decrementing the count stored in the
item's metadata. When the last card is removed the box is used up.

Wired up in `ox_inventory/data/items.lua`:

```lua
['business_card_box'] = {
    label = 'Business Card Box',
    weight = 400,
    stack = false,
    consume = 0,
    client = {
        image = 'business_card_box.png',
        export = 'dd-cards.useCardBox'
    }
},
```

## `useCard`

```lua
exports['dd-cards']:useCard()
```

Opens the card viewer for a `business_card`, showing the design the card was printed from.

```lua
['business_card'] = {
    label = 'Business Card',
    weight = 5,
    stack = false,
    consume = 0,
    client = {
        image = 'business_card.png',
        export = 'dd-cards.useCard'
    }
},
```

## On qb-inventory

qb-inventory does not use exports for item behaviour — it calls back into the resource that
registered the item as useable. That registration is handled inside dd-cards, so on qb-inventory
there is nothing to wire up beyond setting `useable = true` in `qb-core/shared/items.lua`. See
[Items & images](/docs/dd-cards/items#qb-inventory).

## What is not published

<Callout type="note">
dd-cards is escrow protected, and its gameplay code under `modules/` is encrypted. Beyond the two
exports above, there is **no published event or export API** — no documented net events, no
callbacks, and no server-side exports for creating orders or granting cards programmatically.
</Callout>

If you need an integration point that does not exist, the practical route is a
[custom bridge](/docs/dd-cards/bridges) — those files are outside escrow and run inside the resource, so they can
see what an external script cannot.
