import AWCElement from '../../internal/awc-element.js'; import AWCIcon from '../icon/icon.js'; import AWCImage from '../image/image.js'; import type { BaseOEmbedProps } from './oembed.utils.js'; import type { CSSResultGroup } from 'lit'; /** * @summary An embedded representation of a URL on third party sites * @documentation https://webcomponents.adeliom.io/?path=/docs/components-oembed--documentation * @status experimental * @since 1.0 * * @dependency awc-image * @dependency awc-icon * * @event awc-load - Emitted when the image loads successfully. * @event awc-error - Emitted when the image fails to load. * * @slot base - The base component slot. * @slot embed - Slot for the embed content. * @slot thumbnail - Optional thumbnail to use instead of the default. Works best with ``. * @slot play-icon - Optional play icon to use instead of the default. Works best with ``. * * @csspart base - The component's base wrapper. * @csspart thumbnail - The container who containe the thumbnail image. * @csspart control-box - The container that surrounds the play icon and provides their background. * * @cssproperty --control-box-size - The size of the icon box. * @cssproperty --icon-size - The size of the play icon. */ export default class AWCOembed extends AWCElement implements BaseOEmbedProps, CSSStyleDeclaration> { static styles: CSSResultGroup; static dependencies: { 'awc-icon': typeof AWCIcon; 'awc-image': typeof AWCImage; }; /** The URL */ src: string; /** The intrinsic width of the embed in pixels. Must be an integer without a unit. */ width?: number; /** The intrinsic height of the embed in pixels. Must be an integer without a unit. */ height?: number; /** Instead of specifying both `width` and `height`, you can specify can `aspectRatio`. */ aspectRatio?: number; /** The resizing behaviour of the embed. */ layout: 'fixed' | 'constrained' | 'fullWidth'; /** Set the frameborder attribute, only used in iframe embeds. */ frameBorder: string; /** Allow fullscreen mode */ allowFullscreen: boolean; /** For YouTube only. Enable privacy mode. */ privacyEnhancedMode: boolean; /** Indicates how the browser should load the iframe. see [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#loading) */ loading?: 'eager' | 'lazy'; /** Override the default thumbnail */ thumbnail?: string; /** Plays the embed. When this attribute is remove, the embed will reset. */ play: boolean; private isLoading; private data?; connectedCallback(): void; private handleLoad; private handleError; private handleClick; render(): import("lit-html").TemplateResult; }