# bettercx-widget

<!-- Auto Generated Below -->


## Properties

| Property                | Attribute                 | Description | Type                            | Default                             |
| ----------------------- | ------------------------- | ----------- | ------------------------------- | ----------------------------------- |
| `aiServiceUrl`          | `ai-service-url`          |             | `string`                        | `'https://widget.bettercx.ai/prod'` |
| `autoInit`              | `auto-init`               |             | `boolean`                       | `true`                              |
| `baseUrl`               | `base-url`                |             | `string`                        | `'https://api.bettercx.ai'`         |
| `debug`                 | `debug`                   |             | `boolean`                       | `false`                             |
| `embedded`              | `embedded`                |             | `boolean`                       | `false`                             |
| `embeddedPlacement`     | `embedded-placement`      |             | `"bottom" \| "center" \| "top"` | `'center'`                          |
| `embeddedSize`          | `embedded-size`           |             | `"full" \| "medium" \| "small"` | `'full'`                            |
| `isAttachmentsDisabled` | `is-attachments-disabled` |             | `boolean`                       | `false`                             |
| `language`              | `language`                |             | `"auto" \| "en" \| "pl"`        | `'auto'`                            |
| `position`              | `position`                |             | `"left" \| "right"`             | `'right'`                           |
| `publicKey`             | `public-key`              |             | `string`                        | `undefined`                         |
| `theme`                 | `theme`                   |             | `"auto" \| "dark" \| "light"`   | `'auto'`                            |


## Events

| Event         | Description | Type                       |
| ------------- | ----------- | -------------------------- |
| `widgetEvent` |             | `CustomEvent<WidgetEvent>` |


## Methods

### `close() => Promise<void>`



#### Returns

Type: `Promise<void>`



### `open() => Promise<void>`



#### Returns

Type: `Promise<void>`



### `sendMessage(content: string, images?: File[]) => Promise<void>`



#### Parameters

| Name      | Type     | Description |
| --------- | -------- | ----------- |
| `content` | `string` |             |
| `images`  | `File[]` |             |

#### Returns

Type: `Promise<void>`



### `toggle() => Promise<void>`



#### Returns

Type: `Promise<void>`




## Dependencies

### Depends on

- [bcx-chat-list](../bcx-chat-list)
- [bcx-product-slider](../bcx-product-slider)
- [bcx-message-composer](../bcx-message-composer)

### Graph
```mermaid
graph TD;
  bettercx-widget --> bcx-chat-list
  bettercx-widget --> bcx-product-slider
  bettercx-widget --> bcx-message-composer
  style bettercx-widget fill:#f9f,stroke:#333,stroke-width:4px
```

----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*
