/*global s9e, hljs*/ import Post from './Post'; import classList from '../../common/utils/classList'; import PostUser from './PostUser'; import PostMeta from './PostMeta'; import PostEdited from './PostEdited'; import EditPostComposer from './EditPostComposer'; import ItemList from '../../common/utils/ItemList'; import listItems from '../../common/helpers/listItems'; import Button from '../../common/components/Button'; /** * The `CommentPost` component displays a standard `comment`-typed post. This * includes a number of item lists (controls, header, and footer) surrounding * the post's HTML content. * * ### Props * * - `post` */ export default class CommentPost extends Post { init() { super.init(); /** * If the post has been hidden, then this flag determines whether or not its * content has been expanded. * * @type {Boolean} */ this.revealContent = false; // Create an instance of the component that displays the post's author so // that we can force the post to rerender when the user card is shown. this.postUser = new PostUser({post: this.props.post}); this.subtree.check( () => this.postUser.cardVisible, () => this.isEditing() ); } content() { // Note: we avoid using JSX for the