## class: `WyFileMenu`, `wy-file-menu`

Dropdown menu for file actions (download, open, rename, subscribe, trash etc).

**Used sub components:**

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

### Fields

| Name               | Type                         | Default                                                                                            | Description                                         | Inherited From |
| ------------------ | ---------------------------- | -------------------------------------------------------------------------------------------------- | --------------------------------------------------- | -------------- |
| `file`             | `FileType`                   |                                                                                                    | File to operate on when rendering menu actions.     |                |
| `small`            | `boolean`                    | `false`                                                                                            | Render the dropdown using compact button styling.   |                |
| `hasEventListener` | `{ [key: string]: boolean }` | `{ "edit-name": false, subscribe: false, trash: false, restore: false, "delete-forever": false, }` | Tracks which action events have listeners attached. |                |

### Methods

| Name               | Description | Parameters                                                                                                | Return | Inherited From |
| ------------------ | ----------- | --------------------------------------------------------------------------------------------------------- | ------ | -------------- |
| `addEventListener` |             | `type: string, listener: EventListenerOrEventListenerObject, options: boolean \| AddEventListenerOptions` | `void` |                |

### Events

| Name             | Type                         | Description                                        | Inherited From |
| ---------------- | ---------------------------- | -------------------------------------------------- | -------------- |
| `edit-name`      | `FileEditNameEventType`      | Emitted when rename mode should be activated.      |                |
| `subscribe`      | `FileSubscribeEventType`     | Emitted when subscribe/unsubscribe is requested.   |                |
| `trash`          | `FileTrashEventType`         | Emitted when a file should be moved to trash.      |                |
| `restore`        | `FileRestoreEventType`       | Emitted when a trashed file should be restored.    |                |
| `delete-forever` | `FileDeleteForeverEventType` | Emitted when a file should be permanently deleted. |                |

### Attributes

| Name               | Field            | Inherited From |
| ------------------ | ---------------- | -------------- |
| `file`             | file             |                |
| `small`            | small            |                |
| `hasEventListener` | hasEventListener |                |

### Slots

| Name | Description                |
| ---- | -------------------------- |
|      | Additional file menu items |

<hr/>

## Exports

| Kind                        | Name           | Declaration | Module                         | Package |
| --------------------------- | -------------- | ----------- | ------------------------------ | ------- |
| `js`                        | `WyFileMenu`   | WyFileMenu  | lib/components/wy-file-menu.ts |         |
| `custom-element-definition` | `wy-file-menu` | WyFileMenu  | lib/components/wy-file-menu.ts |         |
