import React from 'react'; // jshint ignore:line import CategoryPicker from 'misago/components/threads/category-picker'; // jshint ignore:line import ModerationControls from 'misago/components/threads/moderation/controls'; // jshint ignore:line import SelectionControls from 'misago/components/threads/moderation/selection'; // jshint ignore:line export default class extends React.Component { getCategoryPicker() { if (this.props.subcategories.length) { /* jshint ignore:start */ return
; /* jshint ignore:end */ } else { return null; } } showModerationOptions() { return this.props.user.id && this.props.moderation.allow; } getSelectionButton() { if (this.showModerationOptions()) { /* jshint ignore:start */ return
; /* jshint ignore:end */ } else { return null; } } getSelectedThreads() { return this.props.threads.filter((thread) => { return this.props.selection.indexOf(thread.id) >= 0; }); } getModerationButton() { if (this.showModerationOptions()) { /* jshint ignore:start */ return
; /* jshint ignore:end */ } else { return null; } } render() { /* jshint ignore:start */ return
{this.getCategoryPicker()} {this.getSelectionButton()} {this.getModerationButton()}
; /* jshint ignore:end */ } }