import { LitElement, nothing } from 'lit';
import '../icon-button/IconButton.js';
import '../icon/Icon.js';
import '../linear-progress/LinearProgress.js';
export type FileStatus = 'pending' | 'uploading' | 'complete' | 'error';
export type FileStatusSettable = 'uploading' | 'complete' | 'error';
interface FileStateBase {
    readonly id: string;
    readonly file: File;
    /** Optional icon override; when absent, derived from file.type */
    readonly symbol?: string;
}
/**
 * Discriminated union on `status`. Illegal combinations (error with no message,
 * uploading at 100% without completing, complete with an error message) are
 * unrepresentable by construction.
 */
export type FileState = (FileStateBase & {
    readonly status: 'pending';
    readonly progress: 0;
}) | (FileStateBase & {
    readonly status: 'uploading';
    readonly progress: number;
}) | (FileStateBase & {
    readonly status: 'complete';
    readonly progress: 100;
}) | (FileStateBase & {
    readonly status: 'error';
    readonly progress: number;
    readonly errorMessage: string;
});
declare const UploadItem_base: (new (...args: any[]) => import("../../util/EventEmitterMixin.js").EventEmitterMixinInterface) & (new (...args: any[]) => import("../../util/ReadyMixin.js").ReadyMixinInterface) & typeof LitElement;
/**
 * Internal upload item sub-component for displaying individual file upload state.
 *
 * This component is not part of the public API — consumers should not create,
 * query, or modify items directly. All interaction goes through `btu-upload` methods.
 *
 * @element btu-upload-item
 *
 * @fires {CustomEvent<{id: string}>} btu-upload-item-remove - Fired when remove button is clicked
 * @fires {CustomEvent<{id: string}>} btu-upload-item-retry - Fired when retry link is clicked
 *
 * @cssprop --upload-item-bg - Item background color (default: white)
 * @cssprop --upload-item-border-color - Item border color (default: gray-200)
 * @cssprop --upload-item-active-border-color - Item active/in-progress border (default: gray-300)
 * @cssprop --upload-item-complete-border-color - Item completed border color (default: primary-500)
 * @cssprop --upload-item-error-bg - Item error background (default: error-25)
 * @cssprop --upload-item-error-border-color - Item error border color (default: error-300)
 */
export default class UploadItem extends UploadItem_base {
    private _state;
    private _baseClasses;
    private _previousStatus;
    private _stopProgressComplete;
    createRenderRoot(): this;
    connectedCallback(): void;
    disconnectedCallback(): void;
    /** @internal Called by Upload to push file state */
    _configure(state: FileState): void;
    willUpdate(): void;
    private _scheduleCelebrate;
    private _handleRemove;
    private _handleRetry;
    render(): typeof nothing | import("lit-html").TemplateResult<1>;
}
declare global {
    interface HTMLElementTagNameMap {
        'btu-upload-item': UploadItem;
    }
}
export {};
//# sourceMappingURL=UploadItem.d.ts.map