import { LitElement } from 'lit';
import '../icon/Icon.js';
import './UploadItem.js';
import type { FileState, FileStatus, FileStatusSettable } from './UploadItem.js';
export type { FileState, FileStatus, FileStatusSettable };
declare const Upload_base: (new (...args: any[]) => import("../../util/EventEmitterMixin.js").EventEmitterMixinInterface) & (new (...args: any[]) => import("../../util/ReadyMixin.js").ReadyMixinInterface) & typeof LitElement;
/**
 * A file upload component with drop zone and file list.
 *
 * The component is presentation + file-selection only. It handles file browsing,
 * drag-and-drop reception, client-side validation, and rendering the file list
 * with progress bars. It does not perform network requests — the consumer listens
 * for events, performs their own upload, and drives state back via imperative methods.
 *
 * @element btu-upload
 *
 * @fires {CustomEvent<unknown>} btu-upload-ready - Fired when the component has completed first render
 * @fires {CustomEvent<{id: string, file: File}>} btu-upload-file-added - Fired when a file passes validation and is added
 * @fires {CustomEvent<{id: string, file: File}>} btu-upload-file-removed - Fired when a file is removed (user action, programmatic, or on disconnect for in-flight uploads)
 * @fires {CustomEvent<{id: string, file: File}>} btu-upload-file-retry - Fired when user clicks "Try again" on a failed upload
 * @fires {CustomEvent<{file: File, reason: 'type' | 'size' | 'count'}>} btu-upload-file-rejected - Fired when a file fails client-side validation or the queue is full
 * @fires {CustomEvent<{id: string, file: File}>} btu-upload-file-completed - Fired when a file's status transitions into 'complete'
 * @fires {CustomEvent<{method: string, id: string, reason: 'unknown-id' | 'invalid-transition', message: string}>} btu-upload-api-error - Fired when an imperative API call references an unknown id or an illegal status transition
 *
 * @cssprop --upload-dropzone-bg - Drop zone background color (default: gray-25)
 * @cssprop --upload-dropzone-border-color - Drop zone border color (default: gray-300; gray-200 when disabled, gray-400 in high-contrast)
 * @cssprop --upload-dropzone-border-radius - Drop zone border radius (default: borderRadius.lg)
 * @cssprop --upload-dropzone-hover-bg - Drop zone hover background (hover default: gray-50; drag-over default: primary-25)
 * @cssprop --upload-dropzone-hover-border-color - Drop zone hover/focus border color (default: primary-300; drag-over uses primary-400)
 * @cssprop --upload-dropzone-focus-ring-color - Drop zone focus ring color (default: primary-100)
 * @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 Upload extends Upload_base {
    /**
     * Accepted file types, matching the HTML `<input accept>` attribute format.
     * Client-side filter only — the browser's file picker uses this as a hint,
     * and drag-drop is enforced by this component. Server-side validation is
     * still required.
     *
     * Supported forms (comma-separated, any combination):
     * - `image/*` — MIME wildcard (any image)
     * - `application/pdf` — exact MIME type
     * - `.pdf`, `.docx` — file extension (case-insensitive)
     *
     * Examples:
     * - `accept="image/*"` — any image
     * - `accept="image/*,application/pdf"` — images and PDFs
     * - `accept=".jpg,.jpeg,.png,.heic"` — specific extensions
     * - `accept=""` (or omitted) — allow all
     *
     * Note: users can bypass the file picker's filter (most browsers offer an
     * "All Files" option), so this attribute is a UX filter, not a security
     * boundary.
     *
     * @attr
     */
    accept: string;
    /**
     * Maximum file size in bytes. Files exceeding this are rejected. 0 means unlimited.
     * @attr max-file-size
     */
    maxFileSize: number;
    /**
     * Maximum number of files allowed. When omitted, uploads are unlimited.
     * `max-files="1"` enters single-file mode (selecting a new file replaces the existing one).
     * `max-files="0"` allows zero files. Values above 1 cap the queue at that many files.
     * @attr max-files
     */
    maxFiles: number;
    /**
     * Disables all interaction — file selection, drag-and-drop, and action buttons.
     * @attr
     */
    disabled: boolean;
    /**
     * Disables drag-and-drop. File selection via click still works.
     * @attr no-drag
     */
    noDrag: boolean;
    private _files;
    private _items;
    private _milestones;
    private _dragOver;
    private _dragCounter;
    private get _inputEl();
    createRenderRoot(): this;
    connectedCallback(): void;
    disconnectedCallback(): void;
    firstUpdated(): void;
    private _handleInputChange;
    private _handleSelectClick;
    private _handleDropzoneClick;
    private _handleDragEnter;
    private _handleDragOver;
    private _handleDragLeave;
    private _handleDrop;
    private _processFiles;
    private _rejectCount;
    private _validateFile;
    private _addFile;
    private _reportUnknownId;
    private _getOrReport;
    private _renderItem;
    /**
     * Update the progress of a file upload.
     * Clamps value to 0-100 and coerces non-finite inputs to 0. Announces milestones
     * (25%, 50%, 75%) to screen readers; 100% completion is announced by setFileStatus('complete').
     *
     * Status transitions:
     * - `pending` → `uploading` (auto — first progress report starts the upload)
     * - `uploading` → `uploading` (progress updates)
     * - `error` → `error` (progress updates only; status is preserved so a stale late
     *   callback can't wipe the error UI. To recover from error, call
     *   `setFileStatus(id, 'uploading')` first, then report progress.)
     * - `complete` → ignored (terminal state)
     */
    setFileProgress(id: string, percent: number): void;
    /**
     * Set the status of a file.
     * Valid statuses: 'uploading', 'complete', 'error'. For 'error' status, an
     * optional message can be provided.
     *
     * Transitions from 'complete' are rejected (terminal state) — a late-resolving
     * XHR cannot overwrite a prior success. Rejected calls emit `btu-upload-api-error`
     * with reason: 'invalid-transition'.
     */
    setFileStatus(id: string, status: FileStatusSettable, message?: string): void;
    /**
     * Override the icon symbol for a file.
     */
    setFileSymbol(id: string, symbol: string): void;
    /**
     * Remove a file programmatically. Fires `btu-upload-file-removed`.
     */
    removeFile(id: string): void;
    /**
     * Get a snapshot of all current files and their states.
     * States are readonly; mutations on the returned array's elements are ineffective.
     */
    getFiles(): readonly FileState[];
    private get _dropzoneFull();
    private get _interactionBlocked();
    private get _showCountPill();
    private _renderSelectButton;
    render(): import("lit-html").TemplateResult<1>;
}
declare global {
    interface HTMLElementTagNameMap {
        'btu-upload': Upload;
    }
}
//# sourceMappingURL=Upload.d.ts.map