import { PropertyValueMap } from 'lit';
import { FileOrderType, FileViewType } from '../types/files.types';
import { WeavySubAppComponent } from '../classes/weavy-sub-app-component';
import { ShadowPartsController } from '../controllers/shadow-parts-controller';
import { AppType } from '../types/app.types';
import { RealtimeFileEventType } from '../types/realtime.types';
declare global {
    interface HTMLElementTagNameMap {
        "wy-files-list": WyFilesList;
    }
}
/**
 * Container that renders files either in a grid or a table (list) view and proxies file events.
 *
 * **Used sub components:**
 *
 * - [`<wy-file-grid>`](./wy-file-grid.ts)
 * - [`<wy-file-table>`](./wy-file-table.ts)
 * - [`<wy-preview>`](./wy-preview.ts)
 * - [`<wy-empty>`](./wy-empty.ts)
 * - [`<wy-icon>`](./ui/wy-icon.ts)
 * - [`<wy-progress-circular>`](./ui/wy-progress-circular.ts)
 *
 * @csspart wy-files-list - Root wrapper (applies host styles from hostContentsCss).
 * @csspart wy-pager - Pager anchor for infinite scrolling detection.
 * @csspart wy-pager-bottom - Modifier for pager placed in the bottom.
 *
 * @fires {FileOpenEventType} file-open - Emitted when a file should be opened in preview.
 * @fires {OrderEventType<FileOrderType>} order - Emitted when the user changes sort order.
 * @fires {FileEditNameEventType} edit-name - Emitted when rename mode is activated.
 * @fires {FileRenameEventType} rename - Emitted when a file is renamed.
 * @fires {FileTrashEventType} trash - Emitted when a file is trashed.
 * @fires {FileRestoreEventType} restore - Emitted when a file is restored.
 * @fires {FileDeleteForeverEventType} delete-forever - Emitted when a file is permanently deleted.
 * @fires {FileSubscribeEventType} subscribe - Emitted when subscribe state is toggled.
 * @fires {WyActionEventType} wy-action - Emitted when an embed action button is triggered.
 * @fires {WyPreviewOpenEventType} wy-preview-open - Fired when a preview overlay is about to open.
 * @fires {WyPreviewCloseEventType} wy-preview-close - Fired when a preview overlay is closed.
 */
export declare class WyFilesList extends WeavySubAppComponent {
    #private;
    static styles: import('lit').CSSResult[];
    /** @internal */
    protected exportParts: ShadowPartsController;
    /**
     * File order in the list. Order by combined with direction.
     */
    order: FileOrderType;
    /**
     * The view for showing the file list.
     */
    view: FileViewType;
    /**
     * Enable showing trashed files.
     */
    showTrashed: boolean;
    /**
     * File id that should be highlighted and scrolled into view.
     *
     * @internal
     */
    highlightId?: number;
    /**
     * Whether the highlighted entity targets a comment thread.
     *
     * @internal
     */
    highlightComment: boolean;
    /**
     * Query controller tracking the paged file list.
     * @internal
     */
    private filesQuery;
    /**
     * Mutation handling rename requests.
     * @internal
     */
    private renameFileMutation?;
    /**
     * Mutation handling subscribe/unsubscribe actions.
     * @internal
     */
    private subscribeFileMutation?;
    /**
     * Mutation handling file trashing.
     * @internal
     */
    private trashFileMutation?;
    /**
     * Mutation handling file restoration.
     * @internal
     */
    private restoreFileMutation?;
    /**
     * Mutation handling permanent deletion.
     * @internal
     */
    private deleteForeverFileMutation?;
    /**
     * Reference to the preview overlay component.
     * @internal
     */
    private previewRef;
    /**
     * Infinite scroll controller for lazy loading.
     * @internal
     */
    private infiniteScroll;
    /**
     * Intersection target for infinite scrolling.
     * @internal
     */
    private pagerRef;
    /**
     * Resolve the query key used for the app file listing.
     *
     * @internal
     * @param app - App owning the files.
     */
    protected getFilesQueryKey(app: AppType): (string | number)[];
    /** Handler for realtime file creation events */
    protected handleRealtimeFileCreated: (realtimeEvent: RealtimeFileEventType) => void;
    /**
     * Refresh data after realtime file updates.
     * @internal
     */
    protected handleRealtimeFileUpdated: (_realtimeEvent: RealtimeFileEventType) => void;
    /**
     * Refresh data after files are trashed.
     * @internal
     */
    protected handleRealtimeFileTrashed: (_realtimeEvent: RealtimeFileEventType) => void;
    /**
     * Refresh data after files are restored.
     * @internal
     */
    protected handleRealtimeFileRestored: (_realtimeEvent: RealtimeFileEventType) => void;
    /**
     * Refresh data after files are deleted.
     * @internal
     */
    protected handleRealtimeFileDeleted: (_realtimeEvent: RealtimeFileEventType) => void;
    /**
     * Refresh data when a comment is added to a file.
     * @internal
     */
    protected handleRealtimeCommentCreated: () => void;
    /**
     * Emit a `file-open` event requesting preview for the supplied file.
     *
     * @param fileId - Identifier of the file to open.
     * @param tab - Optional preview tab to activate.
     * @returns {boolean} True if the event was not canceled.
     */
    dispatchFileOpen(fileId: number, tab?: "comments" | "versions"): boolean;
    /**
     * Emit an `order` event with the provided sort order.
     *
     * @param order - Order to apply.
     * @returns {boolean} True if the event was not canceled.
     */
    dispatchOrder(order: FileOrderType): boolean;
    protected willUpdate(changedProperties: PropertyValueMap<this>): Promise<void>;
    render(): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1>;
    protected updated(): void;
    disconnectedCallback(): void;
}
//# sourceMappingURL=wy-files-list.d.ts.map