import * as React from 'react';
import { DiscussionsList } from '../../../discussions/DiscussionsList';
import { DiscussionsCreate } from './DiscussionsCreate';
import { DiscussionsThread } from './DiscussionsThread';
export class DiscussionsTree extends React.PureComponent {
    render() {
        const hash = new URLSearchParams(this.props.location.hash.slice('#'.length));
        const threadID = hash.get('threadID');
        const commentID = hash.get('commentID');
        if (threadID && commentID) {
            return React.createElement(DiscussionsThread, Object.assign({ threadID: threadID, commentID: commentID }, this.props));
        }
        if (threadID) {
            return React.createElement(DiscussionsThread, Object.assign({ threadID: threadID }, this.props));
        }
        if (hash.get('createThread') === 'true') {
            return React.createElement(DiscussionsCreate, Object.assign({}, this.props));
        }
        return React.createElement(DiscussionsList, Object.assign({}, this.props));
    }
}
//# sourceMappingURL=DiscussionsTree.js.map