UNPKG

@cometchat/chat-uikit-react-native

Version:

Ready-to-use Chat UI Components for React Native

64 lines (63 loc) 2.1 kB
import { CometChat } from "@cometchat/chat-sdk-react-native"; import { OutgoingCallConfiguration } from "../CometChatOutgoingCall"; import { CallButtonStyle } from "./style"; import { DeepPartial } from "../../shared/helper/types"; import { JSX } from "react"; declare const CometChatCalls: any; /** * Props for the CometChatCallButtons component. * * @interface CometChatCallButtonsInterface */ export interface CometChatCallButtonsInterface { /** * CometChat.User object. */ user?: CometChat.User; /** * CometChat.Group object. */ group?: CometChat.Group; /** * Should the voice call icon be shown. */ hideVoiceCallButton?: boolean; /** * Should the video call icon be shown. */ hideVideoCallButton?: boolean; /** * Callback to handle errors. * * @param {CometChat.CometChatException} e - The exception object. */ onError?: (e: CometChat.CometChatException) => void; /** * Function to build call settings. * * @param {CometChat.User} [user] - The user object. * @param {CometChat.Group} [group] - The group object. * @param {boolean} [isAudioOnly] - Flag indicating if the call is audio only. * @returns {CometChatCalls.CallSettingsBuilder} The call settings builder. */ callSettingsBuilder?: (user?: CometChat.User, group?: CometChat.Group, isAudioOnly?: boolean) => typeof CometChatCalls.CallSettingsBuilder; /** * Configuration for outgoing calls. */ outgoingCallConfiguration?: OutgoingCallConfiguration; /** * Custom style overrides for the call button. */ style?: DeepPartial<CallButtonStyle>; } /** * CometChatCallButtons component. * * This component renders call action buttons (voice and video) and handles call initiation, * outgoing call screen, and call events. * * @param {CometChatCallButtonsInterface} props - Component properties. * @returns {JSX.Element} The rendered component. */ export declare const CometChatCallButtons: (props: CometChatCallButtonsInterface) => JSX.Element; export {};