## 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. |                |

### Methods

| Name             | Description                                          | Parameters                        | Return                       | Inherited From    |
| ---------------- | ---------------------------------------------------- | --------------------------------- | ---------------------------- | ----------------- |
| `whenReady`      | Resolves when the component has rendered first time. |                                   | `Promise<WeavySubComponent>` | WeavySubComponent |
| `dispatchAction` | Dispatch a \`wy-action\` event on the component.     | `detail: WyActionEventDetailType` | `boolean`                    | WeavySubComponent |

### Events

| Name        | Type                | Description                                       | Inherited From    |
| ----------- | ------------------- | ------------------------------------------------- | ----------------- |
| `wy-action` | `WyActionEventType` | Emitted when an action is performed on an entity. |                   |
| `ready`     | `CustomEvent`       | When the component has rendered.                  | WeavySubComponent |

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

### Fields

| Name                | Privacy   | Type                                                  | Default                                                              | Description | Inherited From    |
| ------------------- | --------- | ----------------------------------------------------- | -------------------------------------------------------------------- | ----------- | ----------------- |
| `exportParts`       | protected |                                                       | `new ShadowPartsController(this)`                                    |             |                   |
| `#resolveContextId` | private   | `(contextId: ContextIdType) => void \| undefined`     |                                                                      |             | WeavySubComponent |
| `#whenContextId`    | private   |                                                       | `new Promise<ContextIdType>((r) => { this.#resolveContextId = r; })` |             | WeavySubComponent |
| `#resolveUser`      | private   | `(user: UserType) => void \| undefined`               |                                                                      |             | WeavySubComponent |
| `#whenUser`         | private   |                                                       | `new Promise<UserType>((r) => { this.#resolveUser = r; })`           |             | WeavySubComponent |
| `#resolveWeavy`     | private   | `(weavy: WeavyType) => void \| undefined`             |                                                                      |             | WeavySubComponent |
| `#whenWeavy`        | private   |                                                       | `new Promise<WeavyType>((r) => { this.#resolveWeavy = r; })`         |             | WeavySubComponent |
| `#resolveReady`     | private   | `(component: WeavySubComponent) => void \| undefined` |                                                                      |             | WeavySubComponent |
| `#whenReady`        | private   |                                                       | `new Promise<WeavySubComponent>((r) => { this.#resolveReady = r; })` |             | WeavySubComponent |

</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 |
| ----------- | ------------------- | ------------------------------------------------- | -------------- |
| `wy-action` | `WyActionEventType` | Emitted when an action is performed on an entity. |                |

### 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)` |             |                |

</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 |         |
