## class: `WyAttachment`, `wy-attachment`

Attachment displayed as list item.

**Used sub components:**

*   [`<wy-item>`](./ui/wy-item)
*   [`<wy-icon>`](./ui/wy-icon)

### Fields

| Name   | Type       | Default | Description                 | Inherited From |
| ------ | ---------- | ------- | --------------------------- | -------------- |
| `file` | `FileType` |         | Attachment file to display. |                |

### Events

| Name        | Type                | Description                                 | Inherited From |
| ----------- | ------------------- | ------------------------------------------- | -------------- |
| `file-open` | `FileOpenEventType` | When opening a file in preview is requested |                |

<details><summary>Private API</summary>

### Fields

| Name          | Privacy   | Type | Default                           | Description | Inherited From |
| ------------- | --------- | ---- | --------------------------------- | ----------- | -------------- |
| `exportParts` | protected |      | `new ShadowPartsController(this)` |             |                |

### Methods

| Name               | Privacy   | Description               | Parameters                 | Return | Inherited From |
| ------------------ | --------- | ------------------------- | -------------------------- | ------ | -------------- |
| `dispatchFileOpen` | protected | Triggers file-open event. | `e: Event, file: FileType` |        |                |

</details>

<hr/>

## class: `WyAttachmentList`, `wy-attachment-list`

List for displaying attachments.

**Used sub components:**

*   [`<wy-attachment>`](./wy-attachment)
*   [`<wy-item-list>`](./ui/wy-item)

### Fields

| Name     | Type         | Default | Description                       | Inherited From |
| -------- | ------------ | ------- | --------------------------------- | -------------- |
| `files`  | `FileType[]` | `[]`    | List of files to display in list. |                |
| `filled` | `boolean`    | `false` | Filled background.                |                |

### Events

| Name        | Type                | Description                                 | Inherited From |
| ----------- | ------------------- | ------------------------------------------- | -------------- |
| `file-open` | `FileOpenEventType` | When opening a file in preview is requested |                |

### Attributes

| Name     | Field  | Inherited From |
| -------- | ------ | -------------- |
| `filled` | filled |                |

<details><summary>Private API</summary>

### Fields

| Name          | Privacy   | Type | Default                           | Description | Inherited From |
| ------------- | --------- | ---- | --------------------------------- | ----------- | -------------- |
| `exportParts` | protected |      | `new ShadowPartsController(this)` |             |                |

### Methods

| Name               | Privacy   | Description | Parameters       | Return | Inherited From |
| ------------------ | --------- | ----------- | ---------------- | ------ | -------------- |
| `dispatchFileOpen` | protected |             | `file: FileType` |        |                |

</details>

<hr/>

## Exports

| Kind                        | Name                 | Declaration      | Module                          | Package |
| --------------------------- | -------------------- | ---------------- | ------------------------------- | ------- |
| `js`                        | `WyAttachment`       | WyAttachment     | lib/components/wy-attachment.ts |         |
| `custom-element-definition` | `wy-attachment`      | WyAttachment     | lib/components/wy-attachment.ts |         |
| `js`                        | `WyAttachmentList`   | WyAttachmentList | lib/components/wy-attachment.ts |         |
| `custom-element-definition` | `wy-attachment-list` | WyAttachmentList | lib/components/wy-attachment.ts |         |
