import { Model } from '../core/Model.js';
import { LiveData } from '../reactive/LiveData.js';
import type SdkService from '../services/SdkService.js';
import type { IFile } from '@api-client/core/models/store/File.js';
import type { ListFileKind } from '@api-client/core/sdk/FilesSdk.js';
import type { ContextListOptions, ContextListResult } from '@api-client/core/events/BaseEvents.js';
export type FilesSource = 'own' | 'shared';
declare enum ModelState {
    /**
     * Not doing anything.
     */
    idle = 0,
    /**
     * Currently querying for file data.
     */
    reading = 1,
    /**
     * Data was received and the result yielded no results or less than the limit.
     */
    ended = 2
}
export default class FilesModel extends Model<LiveData<IFile[]>> {
    #private;
    oid: string;
    sdk: SdkService;
    source: FilesSource;
    /**
     * The pagination cursor for files to use with the next query.
     */
    cursor?: string;
    /**
     * The current state of the model.
     */
    state: ModelState;
    /**
     * The list of file kinds to list.
     * Folders are always included.
     */
    kinds?: ListFileKind[];
    /**
     * The variable parent folder key.
     * This is set when interacting with the UI or when the `folder` attribute change.
     */
    parent?: string;
    get value(): LiveData<IFile[]>;
    constructor(oid: string, sdk: SdkService, source?: FilesSource);
    resetListState(): void;
    scheduleQuery(): void;
    /**
     * Sets a parent and makes the query.
     * It does nothing if the parent is already set.
     *
     * @param key The key of the parent to query. Empty for root folder.
     */
    selectFolder(key?: string): void;
    /**
     * Finds a file by the key.
     * @param key The key of the file to find
     * @returns The file, if any
     */
    getFile(key: string): IFile | undefined;
    replaceFile(file: IFile): void;
    addFile(file: IFile): void;
    removeFile(key: string): void;
    removeFiles(keys: string[]): void;
    listFiles(): Promise<ContextListResult<IFile>>;
    getPageQueryOptions(): ContextListOptions;
    deleteFiles(keys: string[]): Promise<void>;
}
export {};
//# sourceMappingURL=FilesModel.d.ts.map