<ion-view title="Futbal - {{ 'Favorites' | translate }}">
    <ion-content padding="true" class="has-header favorite-wrapper">
        <div class="category-wrapper teams-wrapper">
            <!-- Teams -->
            <h2>{{ 'Teams' | translate }}</h2>
            <div class="paddingx" ng-if="notLoaded">
                <div class="centered loading-content margin-top">
                    <i class="icon ion-loading-c"></i>
                </div>
            </div>
            <a
                    ng-repeat="item in feedFavorites.teams"
                    ng-href="#/app/team/{{item.team_id}}"
                    ng-click="linkAction()"
                    class="favorite-view">
                <div class="centered team">
                    <img ng-src="./img/flags/256/{{item.picture_name}}.png">
                    <p class="name">{{item.name}}</p>
                </div>
            </a>
            <div ng-show="feedFavorites.teams.length === 0">
                {{ 'No likes set' | translate }}
            </div>
        </div>

        <div class="category-wrapper">
            <!-- Social Media -->
            <div
                    ng-if="feedFavorites.social_media.length > 0"
                    class="category-wrapper">
                <h2>{{ 'Social Media' | translate }}</h2>
                <div class="list card favorite-view" ng-repeat="item in feedFavorites.social_media">
                    <div class="item item-image">
                        <img ng-src="{{item.media_url}}:thumb" ng-click="triggerModal()" />
                    </div>
                </div>
            </div>

            <!-- News -->
            <div
                    ng-if="feedFavorites.news.length > 0"
                    class="category-wrapper">
                <h2>{{ 'News' | translate }}</h2>
                <div class="list card favorite-view" ng-repeat="item in feedFavorites.news">
                    <div class="item item-image">
                        <img ng-src="{{item.thumbnail_url}}" ng-click="triggerModal()">
                    </div>
                </div>
            </div>
            <div ng-show="noFeedFavorites">
                <h2>{{ 'Feed' | translate }}</h2>
                {{ 'No likes set' | translate }}
            </div>
        </div>
    </ion-content>
</ion-view>
