import Ember from 'ember';

export default Ember.Component.extend({
  tagName: ['li'],

  selected: Ember.computed.notEmpty('userCategory'),
  userCategories: Ember.inject.service(),
  user: Ember.computed.alias('currentUser.user'),
  usersUserCategories: Ember.computed.alias('user.userCategories'),

  userCategory: Ember.computed('category', 'userCategories.userCategories.isFulfilled', function() {
    let category = this.get('category');
    let userCategories = this.get('userCategories');
    return userCategories.findUserCategory(category);
  }),
});

@@ -25,281 +25,1127 @@
 ';%0A%0A
-export default Ember.Component.extend(%7B%0A  tagName: %5B'li'%5D,%0A%0A  selected: Ember.computed.notEmpty('userCategory'),%0A  userCategories: Ember.inject.service(),%0A  user: Ember.computed.alias('currentUser.user'),%0A  usersUserCategories: Ember.computed.alias('user.userCategories'),%0A
+/**%0A  %60project-category-item%60 represents a category with a project. When selected%0A  the user is taken to a list of projects using this category.%0A%0A  ## Default usage%0A  %60%60%60Handlebars%0A    %7B%7Bproject-category-item category=category%7D%7D%0A  %60%60%60%0A%0A  @class project-category-item%0A  @module Component%0A  @extends Ember.Component%0A */%0Aexport default Ember.Component.extend(%7B%0A  tagName: %5B'li'%5D,%0A%0A  /**%0A    Returns true if 'userCategory' is not empty%0A%0A    @property selected%0A    @type Boolean%0A   */%0A  selected: Ember.computed.notEmpty('userCategory'),%0A%0A  /**%0A    A service that returns all userCategories.%0A%0A    @property userCategories%0A    @type Ember.Service%0A   */%0A  userCategories: Ember.inject.service(),%0A%0A  /**%0A    The current user.%0A%0A    @property user%0A    @type DS.Model%0A   */%0A  user: Ember.computed.alias('currentUser.user'),%0A%0A  /**%0A    Categories that the user belongs to.%0A%0A    @property usersUserCategories%0A    @type Ember.Array%0A   */%0A  usersUserCategories: Ember.computed.alias('user.userCategories'),%0A%0A  /**%0A    Returns the category if it exists in the user's categories.%0A%0A    @property userCategory%0A    @type Ember.Object%0A   */
 %0A  u

Add project-category-item documentation