import { EditorImage, ImageInserter, EditorMetadata } from '@limetech/lime-elements';
import { LimeWebComponentPlatform } from '@limetech/lime-web-components';
import { FileWrapper } from './building-blocks-uploader';
export declare class UploadHandler {
    private platform;
    constructor(platform: LimeWebComponentPlatform);
    /**
     * Handles image paste events in the text editor
     *
     * @param imageInserter - The image inserter with the file info
     * @returns Promise resolving to the uploaded file wrapper or undefined if upload fails
     */
    handleImagePasted(imageInserter: ImageInserter): Promise<FileWrapper | undefined>;
    /**
     * Extracts a file ID from a image source string.
     *
     * This function parses a URL to find a file ID that appears before
     * '/contents/' at the end of the URL.
     *
     * @param src - The URL string to parse
     * @returns The extracted file ID or undefined if no match is found
     *
     * @example
     * // Returns 123
     * parseFileIdFromSrc('/api/file/123/contents/');
     *
     * @example
     * // Returns 456
     * parseFileIdFromSrc('https://example.com/limepkg-email/api/v1/file/456/contents/');
     *
     * @example
     * // Returns undefined
     * parseFileIdFromSrc('/invalid/url/format/');
     */
    parseFileIdFromSrc(src: string): number | undefined;
    /**
     * Validates that the image file size is within limits
     *
     * @param fileInfo - The file info to validate
     * @returns True if file size is valid, false otherwise
     */
    private validateImageSize;
    /**
     * Creates and uploads a file
     *
     * @param fileInfo - The file info to upload
     * @returns Promise resolving to the uploaded file wrapper or undefined if upload fails
     */
    private createFileUpload;
    private get http();
}
export interface EnhancedEditorImage extends EditorImage {
    fileId?: number;
}
/**
 * Extends the EditorMetadata interface from lime-elements to replace the images property
 * with our custom EnhancedEditorImage type
 */
export interface EnhancedEditorMetadata extends Omit<EditorMetadata, 'images'> {
    images: EnhancedEditorImage[];
}
//# sourceMappingURL=building-blocks-upload-handler.d.ts.map