var FormattedMessage = require('react-intl').FormattedMessage;
var FormattedNumber = require('react-intl').FormattedNumber;
var injectIntl = require('react-intl').injectIntl;
var React = require('react');
var Button = require('../../components/forms/button.jsx');
var FlexRow = require('../../components/flex-row/flex-row.jsx');
var Form = require('../../components/forms/form.jsx');
var Select = require('../../components/forms/select.jsx');
var TitleBanner = require('../../components/title-banner/title-banner.jsx');
var messageStatuses = require('../../redux/messages').Status;
// Message Components
var AdminMessage = require('./message-rows/admin-message.jsx');
var BecomeManagerMessage = require('./message-rows/become-manager.jsx');
var CommentMessage = require('./message-rows/comment-message.jsx');
var CuratorInviteMessage = require('./message-rows/curator-invite.jsx');
var FavoriteProjectMessage = require('./message-rows/favorite-project.jsx');
var FollowUserMessage = require('./message-rows/follow-user.jsx');
var ForumPostMessage= require('./message-rows/forum-topic-post.jsx');
var LoveProjectMessage = require('./message-rows/love-project.jsx');
var RemixProjectMessage = require('./message-rows/remix-project.jsx');
var ScratcherInvite = require('./message-rows/scratcher-invite.jsx');
var StudioActivityMessage = require('./message-rows/studio-activity.jsx');
var UserJoinMessage = require('./message-rows/user-join.jsx');
require('./messages.scss');
var SocialMessagesList = React.createClass({
type: 'SocialMessagesList',
propTypes: {
loadStatus: React.PropTypes.string,
messages: React.PropTypes.array.isRequired,
numNewMessages: React.PropTypes.number,
loadMore: React.PropTypes.bool.isRequired,
loadMoreMethod: React.PropTypes.func
},
getDefaultProps: function () {
return {
loadStatus: messageStatuses.FETCHING,
numNewMessages: 0
};
},
getComponentForMessage: function (message, unread) {
var className = (unread) ? 'mod-unread' : '';
var key = message.type + '_' + message.id;
switch (message.type) {
case 'followuser':
return
{this.renderSocialMessages(this.props.messages, (this.props.numNewMessages - 1))}
,
this.renderLoadMore(this.props.loadMore)
] : []}