import { ReportReasonKey } from "../../constants/reportReasons"; export type ReportTargetType = "comment" | "entity" | "message"; export interface UseCreateReportProps { type: ReportTargetType; } export interface CreateReportProps { targetId: string; targetType: ReportTargetType; reason: ReportReasonKey; details?: string; } export interface CreateCommentReportProps { targetId: string; reason: ReportReasonKey; details?: string; } export interface CreateEntityReportProps { targetId: string; reason: ReportReasonKey; details?: string; } /** * `targetId` is the message id. The conversation is resolved server-side, so * no conversationId is needed. The reporter must be a member of the * conversation, and may not report their own message. */ export interface CreateMessageReportProps { targetId: string; reason: ReportReasonKey; details?: string; } declare function useCreateReport({ type }: UseCreateReportProps): ((props: CreateCommentReportProps) => Promise) | ((props: CreateEntityReportProps) => Promise) | ((props: CreateMessageReportProps) => Promise); export default useCreateReport;