export function canReplyToComment(comment, rootComment, readonly) {
    return !comment.isNew && !rootComment?.isResolved && !readonly;
}
export function getCommentParentSnippet(comment, comments) {
    if (!comment.parentCommentId || !comments)
        return undefined;
    const parent = comments.find((candidate) => candidate.id === comment.parentCommentId);
    const words = (parent?.text || "")
        .trim()
        .split(/\s+/)
        .filter((word) => word.length > 0)
        .slice(0, 3);
    return words.length > 0 ? words.join(" ") : undefined;
}
//# sourceMappingURL=feedbackCommentRules.js.map