import type { FileMetadata } from '../../models/interfaces';
import type { RouteName } from '../navigation/routes';
/**
 * Format file size in bytes to human-readable string
 */
export declare function formatFileSize(bytes: number): string;
/**
 * Get icon name for file based on content type
 */
export declare function getFileIcon(contentType: string): string;
/**
 * Unified confirmation dialog - uses Alert.alert for all platforms
 */
export declare function confirmAction(message: string, title?: string, confirmText?: string, cancelText?: string): Promise<boolean>;
/**
 * Convert DocumentPicker asset to File object
 * Handles both web (native File API) and mobile (URI-based) file sources
 * Expo 54 compatible - works across all platforms
 */
export declare function convertDocumentPickerAssetToFile(doc: {
    file?: File | Blob;
    uri?: string;
    name?: string | null;
    mimeType?: string | null;
    size?: number | null;
}, index: number): Promise<File | null>;
/**
 * Helper to safely request a thumbnail variant only for image mime types.
 * Prevents backend warnings: "Variant thumb not supported for mime application/pdf".
 *
 * @param file - File metadata
 * @param variant - Variant type (default: 'thumb')
 * @param getFileDownloadUrl - Function to get download URL from oxyServices
 */
export declare function getSafeDownloadUrl(file: FileMetadata, variant: string | undefined, getFileDownloadUrl: (fileId: string, variant?: string) => string): string;
/**
 * Upload file raw - helper function for file uploads
 */
export declare function uploadFileRaw(file: File | Blob, userId: string, oxyServices: any, visibility?: 'private' | 'public' | 'unlisted'): Promise<any>;
/**
 * Configuration for creating an avatar picker handler
 */
export interface AvatarPickerConfig {
    /** Navigation function from BaseScreenProps */
    navigate?: (screen: RouteName, props?: Record<string, unknown>) => void;
    /** OxyServices instance */
    oxyServices: any;
    /** TanStack Query mutation for updating profile */
    updateProfileMutation: {
        mutateAsync: (updates: {
            avatar: string;
        }) => Promise<any>;
    };
    /** Callback to update local avatar state */
    onAvatarSelected?: (fileId: string) => void;
    /** i18n translation function */
    t: (key: string) => string | undefined;
    /** Optional context name for logging (e.g., 'AccountSettings', 'WelcomeNewUser') */
    contextName?: string;
}
/**
 * Creates a reusable avatar picker handler function.
 *
 * This function navigates to the FileManagement screen and handles:
 * - Image file validation
 * - File visibility update to public
 * - Profile avatar update via mutation
 * - Success/error toast notifications
 *
 * @example
 * ```tsx
 * const openAvatarPicker = createAvatarPickerHandler({
 *   navigate,
 *   oxyServices,
 *   updateProfileMutation,
 *   onAvatarSelected: setAvatarFileId,
 *   t,
 *   contextName: 'AccountSettings'
 * });
 *
 * <TouchableOpacity onPress={openAvatarPicker}>
 *   <Text>Change Avatar</Text>
 * </TouchableOpacity>
 * ```
 */
export declare function createAvatarPickerHandler(config: AvatarPickerConfig): () => void;
//# sourceMappingURL=fileManagement.d.ts.map