## `hb-cookie-law-banner` — cookie-law-banner

**Category:** layout | **Tags:** layout, compliance

### What it does

Bootstrap alert cookie notice until the user accepts or declines; the choice is stored in `localStorage` under `cookielaw`. Supports i18n via `i18nlang`, optional `cookielawuri4more` link, JSON `capabilities` for extended consent, slots to override title/text, and dispatches `acceptCookieLaw` with `{ accepted: "yes" | "no" }`.

### Custom element

`hb-cookie-law-banner`

### Attributes / props (snake_case)

| Property | Type | Notes |
| --- | --- | --- |
| `id` | string (optional) | Element identifier. |
| `style` | string (optional) | Inline style string. |
| `allowdecline` | union (optional) | `"yes"` \| `"no"` — show decline action. |
| `i18nlang` | string (optional) | Language key (e.g. `en`, `it`). |
| `capabilities` | object (optional) | JSON `ICapabilities`: cookie groups and items with scopes, mandatory flags, etc. |
| `cookielawuri4more` | string (optional) | “Learn more” URL. |

**Slots:** `title`, `text`. **i18n:** Italian and English in metadata.

### Events (`CustomEvent` names)

- **`acceptCookieLaw`** — `{ accepted: "yes" | "no" }`

### Usage notes

- Uses Bootstrap alert styling patterns.
- Fullscreen layout size hint in metadata for Storybook-style hosts.
- Shadow DOM; override copy via `title` and `text` slots.
- Set `i18nlang` to match declared languages.

### Minimal HTML example

```html
<hb-cookie-law-banner
  allowdecline="yes"
  i18nlang="en"
  cookielawuri4more="https://example.com/cookies"
></hb-cookie-law-banner>
```
