## class: `WyPreviewEmbed`, `wy-preview-embed`

Lightweight preview wrapper for embedded content.

**Used sub components:**

*   [`<wy-progress-circular>`](./ui/wy-progress-circular)
*   [`<wy-preview-icon>`](./wy-preview-icon)

### Fields

| Name       | Type                            | Default | Description                                        | Inherited From |
| ---------- | ------------------------------- | ------- | -------------------------------------------------- | -------------- |
| `src`      | `string`                        |         | Source URL rendered by the embedded object.        |                |
| `name`     | `string`                        |         | Display name attached to the embed preview.        |                |
| `icon`     | `iconNamesType`                 |         | Icon representing the embed provider.              |                |
| `provider` | `FileProviderType \| undefined` |         | Provider metadata used for fallbacks and labeling. |                |

### Events

| Name                  | Type                         | Description                            | Inherited From |
| --------------------- | ---------------------------- | -------------------------------------- | -------------- |
| `file-preview-loaded` | `FilePreviewLoadedEventType` | The file preview is considered loaded. |                |

### Attributes

| Name       | Field    | Inherited From |
| ---------- | -------- | -------------- |
| `src`      | src      |                |
| `name`     | name     |                |
| `icon`     | icon     |                |
| `provider` | provider |                |

### CSS Parts

| Name                        | Description                                 |
| --------------------------- | ------------------------------------------- |
| `wy-content-embed`          | Object/embed container for the preview.     |
| `wy-content-progress`       | Progress indicator shown while loading.     |
| `wy-content-embed-fallback` | Fallback view shown when embed cannot load. |

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

### Fields

| Name          | Privacy   | Type | Default                           | Description | Inherited From |
| ------------- | --------- | ---- | --------------------------------- | ----------- | -------------- |
| `exportParts` | protected |      | `new ShadowPartsController(this)` |             |                |

### Methods

| Name             | Privacy   | Description                                                         | Parameters | Return    | Inherited From |
| ---------------- | --------- | ------------------------------------------------------------------- | ---------- | --------- | -------------- |
| `dispatchLoaded` | protected | Emit \`file-preview-loaded\` once the preview has finished loading. |            | `boolean` |                |

</details>

<hr/>

## Exports

| Kind                        | Name               | Declaration    | Module                             | Package |
| --------------------------- | ------------------ | -------------- | ---------------------------------- | ------- |
| `js`                        | `WyPreviewEmbed`   | WyPreviewEmbed | lib/components/wy-preview-embed.ts |         |
| `custom-element-definition` | `wy-preview-embed` | WyPreviewEmbed | lib/components/wy-preview-embed.ts |         |
