## `hb-terms-doc-templates` — terms-doc-templates

**Category:** content  
**Tags:** content, compliance

### What it does

Renders legal-style documents from `data`: privacy templates with site, company, admin, and collected-data fields, or cookie policies with a `cookies` list. Use `i18nlang` with registered languages (`it`, `en`) for localized copy; emits `event` for integrations. Includes `skelcontent` slot and `testpart` CSS part (scaffold-style hooks).

### Custom element

`hb-terms-doc-templates`

### Attributes (snake_case; use string values in HTML)

- `id` (optional), `style` (optional): strings.
- `i18nlang` (optional): string — e.g. `it`, `en`.
- `data` (required): JSON string — `ITPrivacy` or `CookieContent` shape (see `types/webcomponent.type.d.ts`).

### Events

- `event`: `{ test: boolean }`.

### Usage notes

- **Slot:** `skelcontent`.
- **CSS part:** `testpart`.
- Large **`data`** payloads should be JSON strings in HTML.

### Minimal HTML example

```html
<hb-terms-doc-templates
  i18nlang="en"
  data='{"id":"cookie-doc-english","site":{"name":"Example","url":"https://example.com","privacyPolicyUri":"https://example.com/privacy","cookiePolicyUri":"https://example.com/cookies"},"company":{"name":"Co","address":"1 St"},"cookies":[]}'
></hb-terms-doc-templates>
```
