`renderCookieList` paints a categorised inventory of the cookies your site uses
into any element — ideal for a standalone cookie-policy or privacy page.

```html
<div id="cookie-declaration"></div>
<script>
  lightning("renderCookieList", "#cookie-declaration");
</script>
```

:::caution[Use `lightning(…)`, not `LightningCMP.*`, in page markup]
`cmp.js` loads `async`, so `window.LightningCMP` usually **does not exist yet**
when an inline `<script>` further down the page runs — calling it directly
throws `LightningCMP is not defined` and nothing renders. The `lightning()`
queue stub from the install snippet queues the call and replays it on load. Only
reach for `LightningCMP.renderCookieList(…)` from code that already runs after
load (an event handler, a framework effect, the DevTools console).

Place the call **after** your `lightning('init', …)` — the queue replays in
order, and the inventory fetch needs the backend that `init` configures.
:::

```ts
renderCookieList(
  target: string | HTMLElement,
  options?: CookieListOptions
): Promise<void>;
```

- `target` — a CSS selector or element to render into.
- The inventory is grouped by category, each cookie showing its name, provider,
  retention and description.
- Requires a configured backend (`apiBase` + `siteId`) — the inventory is served
  from your site's scan results.

## Styling

Unlike the banner and modal, `renderCookieList` does **not** use a shadow root
and adds no CSS of its own. It renders plain semantic HTML — a heading and
paragraph per category, then a `dl` of `dt`/`dd` pairs per cookie — directly
into `target`, so it inherits your page's fonts, colors, and heading styles
and reads as part of the page. The class names it adds
(`lightning-cmp-cookie-list__category`, `__desc`, `__cookies`, `__empty`) are
unstyled hooks you can target from your own site CSS if you want to.

## Options

| Option             | Default            | Meaning                                              |
| ------------------ | ------------------ | ---------------------------------------------------- |
| `text`             | your `init()` copy | Override category labels/descriptions.               |
| `showDescriptions` | `true`             | Show each cookie's description.                      |
| `hideEmpty`        | `false`            | Hide categories with no cookies.                     |
| `heading`          | `"h3"`             | Heading element (`h1`–`h6`) for each category title. |