import { PendingPostCommentOperationSchemaType } from '../schemas.cjs'; import { QueryKey } from '@tanstack/react-query'; import { Hex } from 'viem'; import '@ecp.eth/sdk/indexer'; import '@ecp.eth/sdk/indexer/schemas'; import 'zod/v3'; import '@ecp.eth/shared-signer/schemas/signer-api/shared'; type OnCommentSubmissionStartParams = { /** * Query key to a query where comment is stored */ queryKey: QueryKey; pendingOperation: PendingPostCommentOperationSchemaType; }; type OnCommentSubmissionSuccessParams = Pick; type OnCommentSubmissionErrorParams = Pick & { commentId: Hex; error: Error; }; type OnCommentSubmissionStart = (params: OnCommentSubmissionStartParams) => void; type OnCommentSubmissionSuccess = (params: OnCommentSubmissionSuccessParams) => void; type OnCommentSubmissionError = (params: OnCommentSubmissionErrorParams) => void; type CommentSubmissionAPI = { start: OnCommentSubmissionStart; success: OnCommentSubmissionSuccess; error: OnCommentSubmissionError; }; declare function useCommentSubmission(): CommentSubmissionAPI; export { useCommentSubmission };