import { ContextListResult, ContextSpaceListOptions, DeletedBroadcastEvent, FileAccessBroadcastEvent, FileBreadcrumb, FilePatchBroadcastEvent, IFile, ListFileKind } from "@api-client/core/build/browser.js";
type FilesSource = 'own' | 'shared';
/**
 * Contains a logic to read files from the store.
 *
 * It uses app events to query for the data.
 */
export declare class FileSystem extends EventTarget {
    source: FilesSource;
    /**
     * The list of files to render.
     * Do not overwrite this property or when you must then update the DataTable's `items` as well.
     */
    files: IFile[];
    /**
     * The pagination cursor for files.
     */
    cursor?: string;
    /**
     * This is set when the last files query did not yeld results.
     */
    queryEnded?: boolean;
    /**
     * The currently rendered breadcrumbs.
     */
    breadcrumbs?: FileBreadcrumb[];
    /**
     * Whether the UI is reading files
     */
    reading?: boolean;
    /**
     * The list of file kinds to list.
     * Folders are always included.
     */
    kinds?: ListFileKind[];
    /**
     * The timeout for the query debouncer.
     * When any property change this is the time the element will wait
     * until the actual query is made.
     */
    debounceTimeout: number;
    debouncerValue?: number;
    /**
     * The variable parent folder key.
     * This is set when interacting with the UI or when the `folder` attribute change.
     */
    parent?: string;
    /**
     * The page limit. Defaults to the store defaults.
     * @attribute
     */
    limit?: number;
    filesChannel: BroadcastChannel;
    eventsTarget: EventTarget;
    constructor();
    observe(): void;
    unobserve(): void;
    fileMetaMessageHandler(e: MessageEvent): void;
    handleFileCreated(file: IFile): void;
    handleFileDeleted(event: DeletedBroadcastEvent): void;
    handleFileAccessGranted(event: FileAccessBroadcastEvent): Promise<void>;
    handleFileAccessRemoved(event: FileAccessBroadcastEvent): void;
    removeFileFromList(key: string): void;
    handleFilePatch(event: FilePatchBroadcastEvent): void;
    debounceQuery(): void;
    resetList(): void;
    queryPage(): Promise<void>;
    queryBreadcrumbs(): Promise<void>;
    getPageQueryOptions(): ContextSpaceListOptions;
    listFiles(): Promise<ContextListResult<IFile>>;
    listBreadcrumbs(folder: string): Promise<ContextListResult<FileBreadcrumb>>;
    notifyError(error: string): void;
    notifyUpdate(): void;
    /**
     * Sets a parent and makes the query.
     * @param key The key of the parent to query. Empty for root folder.
     */
    selectFolder(key?: string): void;
    /**
     * Moves to a parent folder, if any.
     */
    parentUp(): Promise<void>;
    /**
     * @param target The HTML element that is a scrollable list if files.
     * @returns True when the scroll position indicates that the user scrolled near the end of the list.
     */
    isListEnd(target: HTMLElement): boolean;
}
export {};
//# sourceMappingURL=FileSystem.d.ts.map