import AWCElement from '../../internal/awc-element.js'; import AWCFormatBytes from '../format-bytes/format-bytes.component.js'; import AWCIconButton from '../icon-button/icon-button.component.js'; import AWCProgressBar from '../progress-bar/progress-bar.component.js'; import type { CSSResultGroup } from 'lit'; /** * @summary File items represent an uploaded file and provides information about file type, file size etc. * @documentation https://webcomponents.adeliom.io/?path=/docs/components-file-upload-item--documentation * @status experimental * @since 1.0 * * @dependency awc-format-bytes * @dependency awc-progress-bar * @dependency awc-icon-button * * @event awc-show - Emitted when the item is added. * @event awc-after-show - Emitted after the item is added and all animations are complete. * @event awc-hide - Emitted when the item is removed. * @event awc-after-hide - Emitted after the item is removed and all animations are complete. * * @slot - The default slot. * @slot image - The image or icon slot. * @slot error - The error slot. * @slot close-button - The close button slot. * * @csspart base - The component's base wrapper. * @csspart image - The icon wrapper. * @csspart label - The file name wrapper. * @csspart error - The error wrapper. * @csspart close-button - The close button, an ``. * @csspart close-button__base - The close button's exported `base` part. * * @animation file-upload-item.show - The animation to use when showing the file item. * @animation file-upload-item.hide - The animation to use when hiding the file item. */ export default class AWCFileUploadItem extends AWCElement { static styles: CSSResultGroup; static dependencies: { 'awc-format-bytes': typeof AWCFormatBytes; 'awc-progress-bar': typeof AWCProgressBar; 'awc-icon-button': typeof AWCIconButton; }; private readonly hasSlotController; private readonly localize; base: HTMLElement; /** Draws the item in a loading state. */ loading: boolean; /** The current progress, 0 to 100. Only respects is loading prop is true. */ progress: number; /** A custom label for the progress bar's aria label. Only respects if loading prop is true. */ label: string; /** The locale to render the component in. */ lang: string; /** Draws the item in a error state. */ error: boolean; /** Makes the item closable. */ closable: boolean; /** A unique value to store in the menu item. This can be used as a way to identify menu items when selected. */ value: string; /** The size of the file in bytes as a read-only 64-bit integer. */ size: number; /** Indicates whether or not the file list item is hidden. */ hidden: boolean; firstUpdated(): void; handleHiddenChange(): Promise; /** Shows the item. */ show(): Promise; /** Hides the item */ hide(): Promise; private handleCloseClick; private handleTriggerKeyUp; render(): import("lit-html").TemplateResult<1>; }