@cometchat/chat-uikit-react
Version:
Ready-to-use Chat UI Components for React(Javascript/Web)
30 lines (29 loc) • 1.23 kB
TypeScript
interface CometChatFlagMessageDialogProps {
message: CometChat.BaseMessage;
/**
* Callback triggered when the dialog is closed.
* @returns void
*/
onClose?: () => void;
/**
* Callback triggered when an error occurs when trying to flag a message.
* @param error - An instance of `CometChat.CometChatException` representing the error.
* @returns void
*/
onError?: ((error: CometChat.CometChatException) => void) | null;
/**
* Callback triggered when the flag report is submitted.
* @param messageId - ID of the message being flagged.
* @param reasonId - ID of the reason for flagging the message.
* @param remark - Optional remark provided by the user.
* @returns A promise that resolves to a boolean indicating the success of the flagging operation.
*/
onSubmit?: (messageId: string, reasonId: string, remark?: string) => Promise<boolean>;
/**
* Boolean to hide the remark input field.
* @defaultValue `false`
*/
hideFlagRemarkField?: boolean;
}
declare const CometChatFlagMessageDialog: (props: CometChatFlagMessageDialogProps) => import("react/jsx-runtime").JSX.Element;
export { CometChatFlagMessageDialog };