import { PropertyValueMap } from 'lit';
import { Ref } from 'lit/directives/ref.js';
import { BlobType, FileMutationContextType, FileOrderType, FileType, CreateFileProps } from '../types/files.types';
import { MutationStateController } from '../controllers/mutation-state-controller';
import { MutationState } from '@tanstack/query-core';
import { WyCloudFiles } from './wy-cloud-files';
import { WeavySubAppComponent } from '../classes/weavy-sub-app-component';
import { ShadowPartsController } from '../controllers/shadow-parts-controller';
declare global {
    interface HTMLElementTagNameMap {
        "wy-files-header": WyFilesHeader;
    }
}
/**
 * Header toolbar for the files view — actions for uploading, sorting, view options and notifications.
 *
 * **Used sub components:**
 *
 * - [`<wy-button>`](./ui/wy-button.ts)
 * - [`<wy-dropdown>`](./ui/wy-dropdown.ts)
 * - [`<wy-icon>`](./ui/wy-icon.ts)
 * - [`<wy-progress-circular>`](./ui/wy-progress-circular.ts)
 * - [`<wy-overlay>`](./ui/wy-overlay.ts)
 * - [`<wy-container>`](./ui/wy-container.ts)
 * - [`<wy-file-item>`](./wy-file-item.ts)
 * - [`<wy-cloud-files>`](./wy-cloud-files.ts)
 * - [`<wy-context-data-progress>`](./wy-context-data.ts)
 *
 * @slot actions - Buttons placed in the toolbar.
 *
 * @csspart wy-files-header - Root header container
 * @csspart wy-header - Header area
 * @csspart wy-header-outer - Outer styling for header area.
 * @csspart wy-files-header-toolbar - Toolbar in the header
 * @csspart wy-toolbar - Toolbar container for header actions
 * @csspart wy-toolbar-buttons - Group for toolbar buttons
 * @csspart wy-toolbar-buttons-last - Right aligned toolbar button group
 *
 * @fires {UploadFilesEventType} upload-files - Emitted when files are selected for upload.
 * @fires {ExternalBlobsEventType} external-blobs - Emitted when external cloud blobs are selected.
 * @fires {CreateFilesEventType} create-files - Emitted to create files programmatically.
 * @fires {OrderEventType<FileOrderType>} order - Emitted when the user changes sort order.
 * @fires {ViewEventType<FileViewType>} view - Emitted when the user changes the view mode (list/grid).
 * @fires {ShowTrashedEventType} show-trashed - Emitted when the show/hide trashed toggle is changed.
 * @fires {SubscribeEventType} subscribe - Emitted when the app subscribe/unsubscribe action is triggered.
 */
export declare class WyFilesHeader extends WeavySubAppComponent {
    static styles: import('lit').CSSResult[];
    /** @internal */
    protected exportParts: ShadowPartsController;
    /**
     * Active sort order for the list.
     */
    order: FileOrderType;
    /**
     * Active layout for rendering files.
     */
    view: "grid" | "list";
    /**
     * Show trashed files when enabled.
     */
    showTrashed: boolean;
    /**
     * Toggle for displaying the upload sheet.
     * @internal
     */
    showUploadSheet: boolean;
    /**
     * Tracks active file mutations for uploads.
     * @internal
     */
    protected mutatingFiles: MutationStateController<BlobType | FileType, Error, unknown, FileMutationContextType>;
    /**
     * Cached failed mutations to detect new errors.
     * @internal
     */
    protected previousFailedFileMutations: MutationState<BlobType | FileType, Error, unknown, FileMutationContextType>[];
    /**
     * Reference to the hidden file input.
     * @internal
     */
    protected fileInputRef: Ref<HTMLInputElement>;
    /**
     * Reference to the cloud files picker element.
     * @internal
     */
    protected cloudFilesRef: Ref<WyCloudFiles>;
    /**
     * Open the native file picker.
     *
     * @internal
     */
    protected openFileInput: () => void;
    /**
     * Open the cloud files picker.
     *
     * @internal
     */
    protected openCloudFiles: () => void;
    /**
     * Remove (or abort) an ongoing upload mutation.
     *
     * @internal
     * @param mutationState - Mutation state to remove.
     */
    protected handleRemoveMutation(mutationState: MutationState<BlobType | FileType, Error, unknown, FileMutationContextType>): Promise<void>;
    /**
     * Retry an upload by replacing the existing file.
     *
     * @internal
     * @param mutation - Failed mutation carrying the blob data.
     */
    protected handleOverwriteUpload(mutation: MutationState<BlobType, Error, CreateFileProps, FileMutationContextType>): void;
    /**
     * Dispatch an `upload-files` event with the selected files.
     *
     * @param files - Files chosen from the native picker.
     * @returns Whether the event was not canceled.
     */
    protected dispatchUploadFiles(files: FileList | null): boolean;
    /**
     * Emit an `external-blobs` event with selected cloud blobs.
     *
     * @internal
     * @param externalBlobs - Blobs returned from the cloud picker.
     * @returns {boolean} True if the event was not canceled.
     */
    private dispatchExternalBlobs;
    /**
     * Emit a `create-files` event for programmatic uploads.
     *
     * @internal
     * @param blobs - Blobs to create files from.
     * @param replace - When true, replace the existing file.
     * @returns {boolean} True if the event was not canceled.
     */
    private dispatchCreateFiles;
    /**
     * Emit an `order` event reflecting the chosen sort order.
     *
     * @internal
     * @param order - Order to apply.
     * @returns {boolean} True if the event was not canceled.
     */
    private dispatchOrder;
    /**
     * Emit a `view` event for changing layout mode.
     *
     * @internal
     * @param view - Layout to activate.
     * @returns {boolean} True if the event was not canceled.
     */
    private dispatchView;
    /**
     * Emit a `show-trashed` event to toggle trashed visibility.
     *
     * @internal
     * @param showTrashed - Whether to show trashed files.
     * @returns {boolean} True if the event was not canceled.
     */
    private dispatchShowTrashed;
    /**
     * Emit a `subscribe` event to toggle app subscription.
     *
     * @internal
     * @param subscribe - Desired subscription state.
     * @returns {boolean} True if the event was not canceled.
     */
    private dispatchSubscribe;
    willUpdate(changedProperties: PropertyValueMap<this>): Promise<void>;
    private renderFileMutation;
    render(): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1>;
    updated(changedProperties: PropertyValueMap<this>): void;
}
//# sourceMappingURL=wy-files-header.d.ts.map