<li>
	<div class="pointer tree-item" ui-if="showLabel" ng-class="getClass(level - 1)" droppable="node">
		<div class="dropdown pull-right">
			<div class="pull-right" ng-click="showCategoryDetails(node)">
				<i class="icon-wrench config pointer"></i>
			</div>
		</div>
		<div ng-click="categoryClicked(node.id)">
			<span class="fldr">
				<i ng-class="{'icon-caret-right': !node.expanded, 'icon-caret-down': node.expanded}" ng-click="toggleCategory(node, $event)" ng-show="showChildren"></i>
				<i ng-class="{'icon-star' : node.id == 'starred', 'icon-inbox': node.id == 'all'}" ng-show="!showChildren"></i>
			</span>
			<span ng-class="{selected: (node.id == selectedId && selectedType == 'category')}">
				<span ng-class="{unread: unreadCount({category:node})}">
					{{categoryLabel(node)}}
				</span>
				&lrm;
				<span class="unread-counter">
					{{categoryCountLabel(node)}}
				</span>
			</span>
		</div>
	</div>
	<ul ng-show="node.expanded && showChildren">
		<recursive>
			<category ng-repeat="child in node.children" ng-show="settingsService.settings.showRead == true || unreadCount({category:node}) > 0"
				node="child" level="level + 1" selected-type="selectedType"
				selected-id="selectedId" show-label="true" show-children="true"
				unread-count="unreadCount({category:category})"> 
			</category> 
		</recursive>
		<li ng-repeat="feed in node.feeds" ng-class="getClass(level)" class="tree-item" draggable="feed" droppable="feed"
			ng-show="settingsService.settings.showRead == true || feed.unread > 0">
			<div class="pull-right" ng-click="showFeedDetails(feed)">
				<i class="icon-wrench config pointer"></i>
			</div>
			<a ng-click="feedClicked(feed.id)" class="feed-link"
				ng-class="{error: feed.message && feed.errorCount > 10, selected: (feed.id == selectedId && selectedType == 'feed') }">
				<favicon url="feed.iconUrl" />
				<span ng-class="{unread: feed.unread}">
					{{feed.name}}
				</span> 
				&lrm;
				<span class="unread-counter">
					{{feedCountLabel(feed)}}
				</span>
			</a>
		</li>
	</ul>
</li>