# Owner Panel

The owner panel lets trusted players manage the shop **directly from the game** — no need to edit config files for promotions, stock, rotations, etc.

### Authorize identifiers

In `shared/config.lua`:

```lua
Owner = {
  AllowedIdentifiers = {
    "license:abc1234567890def",
    "steam:110000abf6b0001",
    "discord:123456789012345678",
  },
  DefaultRotation = 24, -- hours
  Theme = "amber",
}
```

Only listed identifiers can open the panel and perform owner actions. All actions are logged via webhook (if enabled).

### Available features

Each feature can be turned off without touching code:

```lua
Features = {
  Promotions = true,    -- Create / delete promo codes
  LimitedStock = true,  -- Limit how many of each item can be sold
  Rotation = true,      -- Auto-rotate spotlighted items
  Maintenance = true,   -- Lock the shop for everyone except owners
  Spotlight = true,     -- Highlight a specific item on the home page
  Announcement = true,  -- Display a global banner inside the shop
  Theme = true,         -- Change the UI theme at runtime
}
```

### Behavior summary

| Feature           | Effect                                                                            |
| ----------------- | --------------------------------------------------------------------------------- |
| **Promotions**    | Players can use a code at checkout for a percentage discount                      |
| **Limited Stock** | Stock is decremented atomically on checkout; insufficient stock refunds the buyer |
| **Rotation**      | Spotlight rotates automatically every X hours                                     |
| **Maintenance**   | Checkout is blocked for non-owners with a localized error                         |
| **Spotlight**     | One item is featured on the home page                                             |
| **Announcement**  | A banner is shown at the top of the shop until cleared                            |
| **Theme**         | Switches the UI accent at runtime                                                 |

All owner actions go through `var-shop:serverRequest` and are validated server-side against `AllowedIdentifiers`.


---

# 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://doc.var-fivem.com/coins-shop/configuration/owner-panel.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.
