## class: `WyMessengerNew`, `wy-messenger-new`

Weavy messenger component to render a create conversation button with dialogs.

**Used sub components:**

*   [`<wy-conversation-new>`](./components/wy-conversation-new)

### Fields

| Name             | Type                        | Default            | Description                                                                                                            | Inherited From     |
| ---------------- | --------------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------- | ------------------ |
| `link`           | `LinkType \| undefined`     |                    | Any provided link that should be loaded, shown and highlighted.                                                        | WeavyTypeComponent |
| `features`       | `string \| undefined`       |                    | Config for enabling/disabling specific features in the weavy component.&#xA;Prefix a feature with minus to disable it. | WeavyTypeComponent |
| `agent`          | `string \| undefined`       |                    | The configured uid of the agent for the weavy component.                                                               | WeavyTypeComponent |
| `contextualData` | `string \| undefined`       |                    | Contextual data for agents to reference. Provide descriptive data for optimal results.&#xA;&#xA;### Examples           | WeavyTypeComponent |
| `annotations`    | `AnnotationsAppearanceType` | `"buttons-inline"` | Appearance of annotations.                                                                                             | WeavyTypeComponent |
| `enterToSend`    | `EnterToSend`               | `"auto"`           | Enter-to-send keymap in the editor. \`"modifier"\` is \`Enter\` combined with \`Ctrl\` or \`Cmd\`.                     | WeavyTypeComponent |
| `reactions`      | `string`                    | `"😍 😎 😉 😜 👍"` | A space separated string of available reaction emojis in unicode.                                                      | WeavyTypeComponent |
| `weavy`          | `WeavyType \| undefined`    |                    | The consumed weavy context.                                                                                            | WeavyComponent     |
| `contextId`      | `ContextIdType`             |                    | Contextual guid that is unique for the client context.                                                                 | WeavyComponent     |
| `user`           | `UserType \| undefined`     |                    | The current user.                                                                                                      | WeavyComponent     |

### Methods

| Name                 | Description                                                                                     | Parameters                | Return                    | Inherited From |
| -------------------- | ----------------------------------------------------------------------------------------------- | ------------------------- | ------------------------- | -------------- |
| `createConversation` | Creates a new conversation.&#xA;&#xA;When in agent mode, the conversation is created instantly. | `members: MemberIdType[]` |                           |                |
| `selectMembers`      | Opens the select-member dialog.                                                                 |                           |                           |                |
| `whenUser`           | Resolves when current user data is available.                                                   |                           | `Promise<UserType>`       | WeavyComponent |
| `whenWeavy`          | Resolves when a weavy context is available.                                                     |                           | `Promise<WeavyType>`      | WeavyComponent |
| `whenReady`          | Resolves when the component has rendered first time.                                            |                           | `Promise<WeavyComponent>` | WeavyComponent |

### Events

| Name        | Type                | Description                                                        | Inherited From |
| ----------- | ------------------- | ------------------------------------------------------------------ | -------------- |
| `wy-action` | `WyActionEventType` | Emitted when a conversation app is created and should be selected. |                |
| `ready`     | `CustomEvent`       | When the component has rendered.                                   | WeavyComponent |

### Attributes

| Name             | Field          | Inherited From     |
| ---------------- | -------------- | ------------------ |
| `link`           | link           | WeavyTypeComponent |
| `features`       | features       | WeavyTypeComponent |
| `agent`          | agent          | WeavyTypeComponent |
| `contextualData` | contextualData | WeavyTypeComponent |
| `annotations`    | annotations    | WeavyTypeComponent |
| `enterToSend`    | enterToSend    | WeavyTypeComponent |
| `reactions`      | reactions      | WeavyTypeComponent |

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

### Fields

| Name                         | Privacy   | Type                                                               | Default                                                                                                                   | Description                             | Inherited From     |
| ---------------------------- | --------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | ------------------ |
| `visibilityElement`          | protected | `Element \| undefined`                                             |                                                                                                                           | Element to match visibility on.         | WeavyTypeComponent |
| `componentTypes`             | protected | `AppTypeGuid[]`                                                    |                                                                                                                           | Any app types handled by the component. | WeavyTypeComponent |
| `#data`                      | private   | `ContextDataType[] \| undefined`                                   |                                                                                                                           |                                         | WeavyTypeComponent |
| `#annotations`               | private   | `WeavyComponentSettingProps["annotations"] \| undefined`           |                                                                                                                           |                                         | WeavyTypeComponent |
| `#enterToSend`               | private   | `EnterToSend \| undefined`                                         |                                                                                                                           |                                         | WeavyTypeComponent |
| `#reactions`                 | private   | `WeavyComponentSettingProps["reactions"] \| undefined`             |                                                                                                                           |                                         | WeavyTypeComponent |
| `#resolveContextDataBlobs`   | private   | `(blobs: ContextDataBlobsType) => void \| undefined`               |                                                                                                                           |                                         | WeavyTypeComponent |
| `#whenContextDataBlobs`      | private   |                                                                    | `new Promise<ContextDataBlobsType>((r) => { this.#resolveContextDataBlobs = r; })`                                        |                                         | WeavyTypeComponent |
| `#resolveComponentFeatures`  | private   | `(componentFeatures: ComponentFeaturePolicy) => void \| undefined` |                                                                                                                           |                                         | WeavyTypeComponent |
| `#whenComponentFeatures`     | private   |                                                                    | `new Promise<ComponentFeaturePolicy>((r) => { this.#resolveComponentFeatures = r; })`                                     |                                         | WeavyTypeComponent |
| `#resolveLink`               | private   | `(link: LinkType) => void \| undefined`                            |                                                                                                                           |                                         | WeavyTypeComponent |
| `#whenLink`                  | private   |                                                                    | `new Promise<LinkType>((r) => { this.#resolveLink = r; })`                                                                |                                         | WeavyTypeComponent |
| `#resolveSettings`           | private   | `(settings: WeavyComponentSettingsType) => void \| undefined`      |                                                                                                                           |                                         | WeavyTypeComponent |
| `#whenSettings`              | private   |                                                                    | `new Promise<WeavyComponentSettingsType>((r) => { this.#resolveSettings = r; })`                                          |                                         | WeavyTypeComponent |
| `#contextDataRefs`           | private   | `Map<ContextDataType, DataRefType>`                                | `new Map()`                                                                                                               |                                         | WeavyTypeComponent |
| `#uploadContextDataMutation` | private   |                                                                    | `new MutationController<BlobType, Error, MutateFileProps, FileMutationContextType>(this)`                                 |                                         | WeavyTypeComponent |
| `#mutatingContextData`       | private   |                                                                    | `new MutationStateController< BlobType \| FileType \| EmbedType, Error, MutateFileProps, FileMutationContextType >(this)` |                                         | WeavyTypeComponent |
| `#resolveContextId`          | private   | `(contextId: ContextIdType) => void \| undefined`                  |                                                                                                                           |                                         | WeavyComponent     |
| `#whenContextId`             | private   |                                                                    | `new Promise<ContextIdType>((r) => { this.#resolveContextId = r; })`                                                      |                                         | WeavyComponent     |
| `#resolveUser`               | private   | `(user: UserType) => void \| undefined`                            |                                                                                                                           |                                         | WeavyComponent     |
| `#whenUser`                  | private   |                                                                    | `new Promise<UserType>((r) => { this.#resolveUser = r; })`                                                                |                                         | WeavyComponent     |
| `#resolveWeavy`              | private   | `(weavy: WeavyType) => void \| undefined`                          |                                                                                                                           |                                         | WeavyComponent     |
| `#whenWeavy`                 | private   |                                                                    | `new Promise<WeavyType>((r) => { this.#resolveWeavy = r; })`                                                              |                                         | WeavyComponent     |
| `#resolveReady`              | private   | `(component: WeavyComponent) => void \| undefined`                 |                                                                                                                           |                                         | WeavyComponent     |
| `#whenReady`                 | private   |                                                                    | `new Promise<WeavyComponent>((r) => { this.#resolveReady = r; })`                                                         |                                         | WeavyComponent     |
| `#userQuery`                 | private   |                                                                    | `new QueryController<UserType>(this)`                                                                                     |                                         | WeavyComponent     |

</details>

<hr/>

## Exports

| Kind                        | Name               | Declaration    | Module                   | Package |
| --------------------------- | ------------------ | -------------- | ------------------------ | ------- |
| `js`                        | `WyMessengerNew`   | WyMessengerNew | lib/wy-messenger-new\.ts |         |
| `custom-element-definition` | `wy-messenger-new` | WyMessengerNew | lib/wy-messenger-new\.ts |         |
