import { EventEmitter } from '../../stencil-public-runtime'; import type { FileItemRemoveDetail, FileItemState } from './mud-file-item.types'; /** * File Item — single-file row inside `mud-file-input` (or any file list surface). * * Pattern B (atom, internal DOM): renders filename + meta (size / error message) * + state icon + remove button. The remove button is the only interactive * element; the row itself is not focusable so it cannot trap citizens who tab * past a long list. * * @element mud-file-item * * @slot icon - Override the leading file-type icon. Defaults to `attachment`. */ export declare class MudFileItem { /** * Lifecycle state. Drives leading icon color and border treatment. * Matches Figma's 4-state model: `uploaded` (resting), `uploading`, * `success`, `error`. * @default 'uploaded' */ state: FileItemState; /** Visible filename. */ filename: string; /** Optional file size in bytes — rendered as a human-readable string. */ size?: number; /** * Per-item error message. Replaces the size meta line when `state="error"`. */ errorText?: string; /** * Optional image-preview URL (object URL or data URI). When set, a thumbnail * renders in place of the leading file-type icon (the Figma "image-preview" * variation). Falls back to the icon if the image fails to load. */ previewSrc?: string; /** Disables the remove button. */ disabled: boolean; /** Hide the remove button entirely (e.g. read-only summary lists). */ noRemove: boolean; /** * Accessible label for the remove button. Provided in Romanian by default * to match the institutional voice. * @default 'Elimină fișierul' */ removeLabel: string; private previewFailed; /** True when the filename is visually clipped, which gates the hover tooltip. */ private isTruncated; host: HTMLMudFileItemElement; /** Fires when the citizen presses the remove control. The host is responsible for splicing the file out of its list. */ mudRemove: EventEmitter; private filenameEl?; private resizeObserver?; componentDidLoad(): void; componentDidUpdate(): void; disconnectedCallback(): void; /** Compare rendered vs content width to know if the name is clipped (tooltip-worthy). */ private measureTruncation; validateState(next: FileItemState): void; resetPreviewFailure(): void; private handlePreviewError; private handleRemove; private handleRemoveKey; private formatSize; render(): any; }