import WaveSurfer from "../components/BaseComponents/CometChatAudioBubble/src/wavesurfer"; import { CalendarObject } from "./CalendarObject"; import { CometChatTextFormatter } from "../formatters"; interface MediaPlayer { video?: HTMLVideoElement | null; mediaRecorder?: MediaRecorder | null; } /** * storing current media which is being played. */ export declare const currentMediaPlayer: MediaPlayer; export declare const currentAudioPlayer: { instance: WaveSurfer | null; setIsPlaying: ((isPlaying: boolean) => void) | null; }; /** * Function to stop current media playback. */ export declare function closeCurrentMediaPlayer(pauseAudio?: boolean): void; export declare function isMessageSentByMe(message: CometChat.BaseMessage, loggedInUser: CometChat.User): boolean; /** * Function to check if the current browser is safari. * @returns boolean */ export declare function isSafari(): boolean; /** * Checks if a given text is a URL. * A valid URL should start with either "http", "https", or "www" and must not contain spaces. * * @param {string} text - The text to be checked. * @returns {boolean} Returns true if the text is a URL, false otherwise. */ export declare function isURL(text: string): boolean; export declare function getThemeVariable(name: string): string; export declare function getThemeMode(): "light" | "dark"; /** * Function to convert audio forat from webm to wav * @param file * @returns */ export declare function processFileForAudio(file: File): Promise; /** * Converts a Unix timestamp to a formatted date string in DD/MM/YYYY format. * * @param {number} timestamp - The Unix timestamp (in seconds) to be converted. * @returns {string} The formatted date string in DD/MM/YYYY format. */ export declare function formatDateFromTimestamp(timestamp: number): string; export declare function isMobileDevice(): boolean; export declare function sanitizeCalendarObject(calendarObject?: CalendarObject): { [k: string]: any; }; export declare function fireClickEvent(): void; export declare const decodeHTML: (input: string) => string; export declare const sanitizeHtmlStringToFragment: (html: string, textFormatterArray?: CometChatTextFormatter[]) => DocumentFragment; /** * Custom React hook for creating debounced callbacks with automatic cleanup. */ export declare const useDebouncedCallback: (callback: () => void, delay: number) => { debouncedCallback: () => void; cleanup: () => void; }; export declare function createMessageCopy(msg: CometChat.AIAssistantBaseEvent, user: CometChat.User, category?: string, type?: string): CometChat.BaseMessage; export declare function createMessageCopyFromBaseMessage(msg: CometChat.BaseMessage, user: CometChat.User | undefined): CometChat.BaseMessage; export declare function isDarkMode(): boolean; /** * @function shouldShowCustomMimeTypes * @description Returns true if the device is running either iOS (iPhone, iPad, iPod) or macOS. * @returns {boolean} True if the device is an Apple device (iOS or macOS), false otherwise. */ export declare const shouldShowCustomMimeTypes: () => boolean; export {};