import { Comment, CommentIncludeParam } from "../../interfaces/models/Comment"; import { CommentsSortByOptions } from "../../interfaces/CommentsSortByOptions"; import { EntityCommentsTree } from "../../interfaces/EntityCommentsTree"; import { SpaceReputationContextParams } from "../../interfaces/SpaceReputation"; export interface UseEntityCommentsProps extends SpaceReputationContextParams { entityId: string | undefined | null; limit?: number; defaultSortBy?: CommentsSortByOptions; /** Initial sort direction for `sortBy: "createdAt"`. Defaults to `"desc"`. */ defaultSortDir?: "asc" | "desc"; include?: CommentIncludeParam; } export interface UseEntityCommentsValues { entityCommentsTree: EntityCommentsTree; comments: Comment[]; newComments: Comment[]; loading: boolean; hasMore: boolean; sortBy: CommentsSortByOptions | null; setSortBy: (newSortBy: CommentsSortByOptions) => void; /** Sort direction for `sortBy: "createdAt"`. */ sortDir: "asc" | "desc"; setSortDir: (newSortDir: "asc" | "desc") => void; loadMore: () => void; addCommentsToTree: (newComments: Comment[] | undefined, newlyAdded?: boolean) => void; removeCommentFromTree: ({ commentId }: { commentId: string; }) => void; markCommentAsDeleted: ({ commentId }: { commentId: string; }) => void; } declare function useEntityComments(props: UseEntityCommentsProps): UseEntityCommentsValues; export default useEntityComments;