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 ;
case 'loveproject':
return ;
case 'favoriteproject':
return ;
case 'addcomment':
return ;
case 'curatorinvite':
return ;
case 'remixproject':
return ;
case 'studioactivity':
return ;
case 'forumpost':
return ;
case 'becomeownerstudio':
return ;
case 'userjoin':
return ;
}
},
renderSocialMessages: function (messages, unreadCount) {
var messageList = [];
for (var i in messages) {
if (i <= unreadCount) {
messageList.push(this.getComponentForMessage(messages[i], true));
} else {
messageList.push(this.getComponentForMessage(messages[i], false));
}
}
return messageList;
},
renderLoadMore: function (loadMore) {
if (loadMore) {
return ;
}
return null;
},
renderMessageCounter: function (numNewMessages) {
if (numNewMessages > 0) {
return
;
}
return null;
},
render: function () {
if (this.props.loadStatus === messageStatuses.MESSAGES_ERROR) {
return (