import { VirtualBackgroundMode, VirtualBackgroundState, CustomBackgroundImage } from './context';

/**
 * Converts virtual background state to Zoom SDK image URL format
 * @param mode - The virtual background mode
 * @param customImages - Array of custom background images
 * @param activeCustomImageId - ID of the active custom image
 * @returns SDK-compatible image URL string ('', 'blur', or data URL)
 */
export declare const getVirtualBackgroundImageUrl: (mode: VirtualBackgroundMode, customImages: CustomBackgroundImage[], activeCustomImageId: string | null) => string;
/**
 * Validates background image file type
 * @param file - The file to validate
 * @returns true if valid, false otherwise
 */
export declare const isValidImageType: (file: File) => boolean;
/**
 * Validates background image file size
 * @param file - The file to validate
 * @returns true if valid, false otherwise
 */
export declare const isValidImageSize: (file: File) => boolean;
/**
 * Validation result for background image files
 */
export type FileValidationResult = {
    valid: true;
} | {
    valid: false;
    reason: 'invalid-type' | 'too-large';
};
/**
 * Validates a background image file
 * @param file - The file to validate
 * @returns Validation result with reason if invalid
 */
export declare const validateBackgroundImageFile: (file: File) => FileValidationResult;
/**
 * Reads a file as a data URL (Base64)
 * @param file - The file to read
 * @returns Promise resolving to data URL string
 * @throws Error if file reading fails
 */
export declare const readFileAsDataURL: (file: File) => Promise<string>;
/**
 * Gets the virtual background state from mode and image ID
 * @param mode - The virtual background mode
 * @param imageId - Optional image ID for custom backgrounds
 * @param currentState - Current virtual background state
 * @returns New virtual background state
 */
export declare const getVirtualBackgroundState: (mode: VirtualBackgroundMode, imageId: string | undefined, currentState: VirtualBackgroundState) => VirtualBackgroundState;
/**
 * Saves custom background images to localStorage
 * @param images - Array of custom background images
 * @returns true if saved successfully, false otherwise
 */
export declare const saveCustomImagesToLocalStorage: (images: CustomBackgroundImage[]) => boolean;
/**
 * Loads custom background images from localStorage
 * @returns Array of custom background images, or empty array if none found
 */
export declare const loadCustomImagesFromLocalStorage: () => CustomBackgroundImage[];
/**
 * Checks whether a Zoom SDK error indicates virtual background is not supported
 * on the current platform (errorCode 6107 — SharedArrayBuffer unavailable).
 * After this error the SDK already closes the camera track internally.
 */
export declare const isVirtualBackgroundUnsupportedError: (error: unknown) => boolean;
/**
 * Clears all custom background images from localStorage
 */
export declare const clearCustomImagesFromLocalStorage: () => void;
