import { LitElement, type PropertyValues } from 'lit'; import type { AttachmentStatus, AttachmentPurpose } from '../../types/index.js'; /** * @tag loquix-attachment-chip * @summary Displays a single file attachment with icon, name, size, remove/retry actions, and error tooltip. * * @slot icon - Custom icon/preview content. Overrides both `preview` URL and auto-detected emoji icon. * * @csspart chip - The chip container * @csspart icon - The icon/preview area * @csspart remove - The remove button * @csspart retry - The retry button * @csspart error-tooltip - The error tooltip popover * * @cssprop [--loquix-attachment-chip-bg=rgba(0,0,0,0.04)] - Chip background * @cssprop [--loquix-attachment-chip-border-color=rgba(0,0,0,0.08)] - Chip border color * @cssprop [--loquix-attachment-chip-border-radius=8px] - Chip border radius * @cssprop [--loquix-attachment-chip-color=inherit] - Chip text color * @cssprop [--loquix-attachment-chip-padding=6px 10px] - Chip padding * @cssprop [--loquix-attachment-chip-font-size=0.8125rem] - Chip font size * @cssprop [--loquix-attachment-chip-progress-color] - Upload progress bar color * @cssprop [--loquix-attachment-chip-progress-sweep-bg] - Sweep highlight gradient (set to `none` to disable) * @cssprop [--loquix-attachment-chip-progress-sweep] - Sweep animation shorthand (set to `none` to disable) * @cssprop [--loquix-attachment-chip-error-color] - Error state color * @cssprop [--loquix-attachment-chip-filename-max-width] - Max width for filename (CSS, overridden by max-filename-length) * @cssprop [--loquix-attachment-chip-preview-size=28px] - Preview thumbnail size * @cssprop [--loquix-attachment-chip-preview-radius=4px] - Preview thumbnail border radius * * @fires loquix-attachment-remove - Fired when the remove button is clicked. Detail: { attachment } * @fires loquix-attachment-retry - Fired when the retry button is clicked on an errored chip. Detail: { attachment } */ export declare class LoquixAttachmentChip extends LitElement { static styles: import("lit").CSSResult[]; private _localize; /** Display filename */ filename: string; /** MIME type or extension shorthand (e.g. 'image/png', 'pdf', 'ts') */ filetype: string; /** File size in bytes */ size: number; /** Semantic purpose of this attachment */ purpose: AttachmentPurpose | undefined; /** Whether the chip can be removed */ removable: boolean; /** Upload/processing status */ status: AttachmentStatus; /** Upload progress 0-100 */ progress: number; /** Unique attachment id (used in events) */ attachmentId: string; /** Error message (shown in tooltip when status is 'error') */ error: string; /** Max filename length before truncation (0 = no limit, uses CSS text-overflow) */ maxFilenameLength: number; /** Hides the retry button on error state */ noRetry: boolean; /** URL for a thumbnail preview image (shown instead of the auto emoji icon) */ preview: string; private _tooltipEl; /** * Sanitised preview URL — allows blob:, https:, http: protocols. * For data: URLs, only `data:image/*` is permitted (excluding `data:image/svg+xml` * which can contain executable scripts). */ private get _safePreviewUrl(); /** Captured chip width before a status change re-render */ private _prevWidth; /** Timer id for deferred cleanup after width transition */ private _widthTimer; disconnectedCallback(): void; protected willUpdate(changed: PropertyValues): void; protected firstUpdated(): void; protected updated(changed: PropertyValues): void; private get _attachment(); private _formatSize; private _getFileIcon; /** Truncate filename preserving extension: "very-long-name.pdf" → "very-lo…me.pdf" */ private _truncateFilename; private _handleRemove; private _handleRetry; private _showErrorTooltip; private _hideErrorTooltip; private _closeSvg; private _errorSvg; private _retrySvg; private _getStatusLabel; protected render(): import("lit").TemplateResult<1>; } //# sourceMappingURL=loquix-attachment-chip.d.ts.map