## class: `WyConversationItem`, `wy-conversation-item`

Item display of a conversation for use in lists.

**Used sub components**

*   [`<wy-button>`](./ui/wy-button)
*   [`<wy-dropdown>`](./ui/wy-dropdown)
*   [`<wy-dropdown-item>`](./ui/wy-dropdown)
*   [`<wy-icon>`](./ui/wy-icon)
*   [`<wy-item>`](./ui/wy-item)
*   [`<wy-avatar>`](./ui/wy-avatar)
*   [`<wy-avatar-group>`](./ui/wy-avatar)
*   [`<wy-typing>`](./wy-typing)

### Fields

| Name             | Type                  | Default | Description                                                                                       | Inherited From |
| ---------------- | --------------------- | ------- | ------------------------------------------------------------------------------------------------- | -------------- |
| `conversationId` | `number \| undefined` |         | The id of the conversation.&#xA;&#xA;Use this to identify which conversation the item represents. |                |
| `unread`         | `boolean`             | `false` | Whether the conversation is unread.                                                               |                |
| `avatarUrl`      | `string \| undefined` | `""`    | Url to any custom avatar for the conversation. If omitted, member avatars are used.               |                |
| `hideAvatar`     | `boolean`             | `false` | Whether the avatar should be hidden.                                                              |                |
| `name`           | `string`              | `""`    | Any custom title for the conversation item.                                                       |                |
| `type`           | `AppTypeGuid`         |         | The type guid of the conversation.                                                                |                |
| `selected`       | `boolean`             | `false` | Whether the conversation item is selected.                                                        |                |
| `starred`        | `boolean`             | `false` | Whether the conversation is starred.                                                              |                |
| `pinned`         | `boolean`             | `false` | Whether the conversation is pinned.                                                               |                |

### Methods

| Name               | Description                 | Parameters      | Return | Inherited From |
| ------------------ | --------------------------- | --------------- | ------ | -------------- |
| `dispatchSelected` | Trigger \`selected\` event. |                 |        |                |
| `dispatchStar`     | Trigger \`star\` event.     | `star: boolean` |        |                |

### Events

| Name       | Type                    | Description                                                       | Inherited From |
| ---------- | ----------------------- | ----------------------------------------------------------------- | -------------- |
| `selected` | `SelectedEventType`     | Emitted when the conversation item is selected.                   |                |
| `star`     | `StarEventType`         | Emitted when the star/unstar action is requested.                 |                |
| `pin`      | `PinEventType`          | Emitted when the pin/unpin action is requested.                   |                |
| `mark`     | `MessagesMarkEventType` | Emitted when the conversation should be marked read/unread.       |                |
| `leave`    | `LeaveEventType`        | Emitted when the current user requests to leave the conversation. |                |
| `remove`   | `RemoveEventType`       | Emitted when the conversation should be removed/deleted.          |                |
| `trash`    | `TrashEventType`        | Emitted when the conversation should be trashed.                  |                |

### Attributes

| Name             | Field          | Inherited From |
| ---------------- | -------------- | -------------- |
| `conversationId` | conversationId |                |
| `unread`         | unread         |                |
| `avatarUrl`      | avatarUrl      |                |
| `hideAvatar`     | hideAvatar     |                |
| `name`           | name           |                |
| `type`           | type           |                |
| `selected`       | selected       |                |
| `starred`        | starred        |                |
| `pinned`         | pinned         |                |

### CSS Parts

| Name                   | Description                                                    |
| ---------------------- | -------------------------------------------------------------- |
| `wy-conversation-item` | The conversation item container (applied on the inner wy-item) |

<hr/>

## Exports

| Kind                        | Name                   | Declaration        | Module                                 | Package |
| --------------------------- | ---------------------- | ------------------ | -------------------------------------- | ------- |
| `js`                        | `WyConversationItem`   | WyConversationItem | lib/components/wy-conversation-item.ts |         |
| `custom-element-definition` | `wy-conversation-item` | WyConversationItem | lib/components/wy-conversation-item.ts |         |
