import { IWebchatButton, IWebchatQuickReply } from '../types'; /** * Gets the label for a button * Returns "Call" for phone_number buttons without title */ export declare function getWebchatButtonLabel(button: IWebchatButton | IWebchatQuickReply): string | undefined; /** * Interpolates a template string with replacements * Example: interpolateString("{position} of {total}", { position: "1", total: "4" }) * Returns: "1 of 4" */ export declare function interpolateString(template: string, replacements: Record): string; /** * Generates a random ID with optional prefix */ export declare function getRandomId(prefix?: string): string; /** * Move focus to the visually hidden focus target * This prevents focus loss for keyboard users */ export declare function moveFocusToMessageFocusTarget(dataMessageId: string): void; /** * Helper function that replaces URLs in a string with HTML anchor elements * - Works with URLs starting with http/https, www., or just domain/subdomain * - Will only match URLs at the beginning or following whitespace * - Will not work with emails * - URLs are escaped to prevent injection attacks */ export declare function replaceUrlsWithHTMLanchorElem(text: string): string; /** * Sanitizes a URL for use in CSS background-image property * Returns url("...") string or undefined if invalid */ export declare function getBackgroundImage(url: string): string | undefined; /** * Extracts filename without extension * Example: "document.pdf" → "document." */ export declare function getFileName(fileNameWithExtension: string): string; /** * Extracts file extension * Example: "document.pdf" → "pdf" */ export declare function getFileExtension(fileNameWithExtension: string): string | null; /** * Formats file size in MB or KB * Example: 1500000 → "1.50 MB" */ export declare function getSizeLabel(size: number): string; /** * Valid image MIME types for file attachments (Set for O(1) lookup) */ export declare const VALID_IMAGE_MIME_TYPES: Set; /** * Checks if attachment is a valid image type */ export declare function isImageAttachment(mimeType: string): boolean;