import { Components, registerComponent, getFragment, withMessages } from 'meteor/vulcan:core';
import React from 'react';
import PropTypes from 'prop-types';
import Comments from "meteor/vulcan:comments";
import { FormattedMessage } from 'meteor/vulcan:i18n';
const CommentsNewForm = (props, context) => {
let prefilledProps = {postId: props.postId};
if (props.parentComment) {
prefilledProps = Object.assign(prefilledProps, {
parentCommentId: props.parentComment._id,
// if parent comment has a topLevelCommentId use it; if it doesn't then it *is* the top level comment
topLevelCommentId: props.parentComment.topLevelCommentId || props.parentComment._id
});
}
return (