import { Uri as URI } from '@opensumi/ide-core-common';
export declare const CodeDataTransfers: {
    EDITORS: string;
    FILES: string;
};
export interface IDataTransferFile {
    readonly name: string;
    readonly uri?: URI;
    data(): Promise<Uint8Array>;
}
export interface IDataTransferItem {
    readonly id: string;
    asString(): Thenable<string>;
    asFile(): IDataTransferFile | undefined;
    value: any;
}
export declare function createStringDataTransferItem(stringOrPromise: string | Promise<string>): IDataTransferItem;
export declare function createFileDataTransferItem(fileName: string, uri: URI | undefined, data: () => Promise<Uint8Array>): IDataTransferItem;
export declare class VSDataTransfer {
    private readonly _entries;
    get size(): number;
    has(mimeType: string): boolean;
    get(mimeType: string): IDataTransferItem | undefined;
    append(mimeType: string, value: IDataTransferItem): void;
    replace(mimeType: string, value: IDataTransferItem): void;
    delete(mimeType: string): void;
    entries(): Iterable<[string, IDataTransferItem]>;
    values(): Iterable<IDataTransferItem>;
    forEach(f: (value: IDataTransferItem, key: string) => void): void;
    private toKey;
}
export declare const DataTransfers: {
    /**
     * Application specific resource transfer type
     */
    RESOURCES: string;
    /**
     * Browser specific transfer type to download
     */
    DOWNLOAD_URL: string;
    /**
     * Browser specific transfer type for files
     */
    FILES: string;
    /**
     * Typically transfer type for copy/paste transfers.
     */
    TEXT: "text/plain";
};
export declare class DraggedTreeItemsIdentifier {
    readonly identifier: string;
    constructor(identifier: string);
}
/**
 * A singleton to store transfer data during drag & drop operations that are only valid within the application.
 */
export declare class LocalSelectionTransfer<T> {
    private static readonly INSTANCE;
    private data?;
    private proto?;
    private constructor();
    static getInstance<T>(): LocalSelectionTransfer<T>;
    hasData(proto: T): boolean;
    clearData(proto: T): void;
    getData(proto: T): T[] | undefined;
    setData(data: T[], proto: T): void;
}
/** Used to hold the data that is being dragged during a drag and drop operation. It may hold one or more data items, each of one or more data types. For more information about drag and drop, see HTML Drag and Drop API. */
interface DataTransfer {
    /**
     * Returns the kind of operation that is currently selected. If the kind of operation isn't one of those that is allowed by the effectAllowed attribute, then the operation will fail.
     *
     * Can be set, to change the selected operation.
     *
     * The possible values are "none", "copy", "link", and "move".
     */
    dropEffect: 'none' | 'copy' | 'link' | 'move';
    /**
     * Returns the kinds of operations that are to be allowed.
     *
     * Can be set (during the dragstart event), to change the allowed operations.
     *
     * The possible values are "none", "copy", "copyLink", "copyMove", "link", "linkMove", "move", "all", and "uninitialized",
     */
    effectAllowed: 'none' | 'copy' | 'copyLink' | 'copyMove' | 'link' | 'linkMove' | 'move' | 'all' | 'uninitialized';
    /** Returns a FileList of the files being dragged, if any. */
    readonly files: FileList;
    /** Returns a DataTransferItemList object, with the drag data. */
    readonly items: DataTransferItemList;
    /** Returns a frozen array listing the formats that were set in the dragstart event. In addition, if any files are being dragged, then one of the types will be the string "Files". */
    readonly types: ReadonlyArray<string>;
    /** Removes the data of the specified formats. Removes all data if the argument is omitted. */
    clearData(format?: string): void;
    /** Returns the specified data. If there is no such data, returns the empty string. */
    getData(format: string): string;
    /** Adds the specified data. */
    setData(format: string, data: string): void;
    /** Uses the given element to update the drag feedback, replacing any previously specified feedback. */
    setDragImage(image: Element, x: number, y: number): void;
}
export interface FileAdditionalNativeProperties {
    /**
     * The real path to the file on the users filesystem. Only available on electron.
     */
    readonly path?: string;
}
export declare function createFileDataTransferItemFromFile(file: File): IDataTransferItem;
export declare function toVSDataTransfer(dataTransfer: DataTransfer): VSDataTransfer;
export {};
//# sourceMappingURL=data-transfer.d.ts.map