// <div class='achievement achievement-sword'></div>
// <div class='achievement achievement-tree'></div>
// <div class='achievement achievement-comment'></div>
// <div class='achievement achievement-cave'></div>
// <div class='achievement achievement-boot'></div>
// <div class='achievement achievement-coffin'></div>
// <div class='achievement achievement-alien'></div>
// <div class='achievement achievement-ninja'></div>
// <div class='achievement achievement-cactus'></div>
// <div class='achievement achievement-bow'></div>
// <div class='achievement achievement-shield'></div>
// <div class='achievement achievement-karaoke'></div>

if mobile
  .item.item-divider=env.t('achievements')

div(ng-if='::profile.backer.npc')
  .achievement.achievement-helm
  h5
    span.label.label-npc
      | {{::profile.backer.npc}}
      =env.t('npc')
  small=env.t('npcText')
  hr

div(ng-if='::profile.contributor.level || user._id == profile._id')
  .achievement.achievement-firefox(ng-if='::profile.contributor.level')
  div(ng-class='::{muted: !profile.contributor.level}')
    h5
      span.label.label-default(ng-if='::profile.contributor.level', class='label-contributor-{{::profile.contributor.level}}') {{::contribText(profile.contributor, profile.backer)}}
      span.label.label-default(ng-if='::!profile.contributor.level')=env.t('contribName')
    small
      =env.t('contribText')
      |&nbsp;
      a(href='http://habitrpg.wikia.com/wiki/Contributing_to_HabitRPG', target='_blank')=env.t('readMore') 
      | .
  hr

div(ng-if='::profile.backer.tier')
  .achievement.achievement-heart
  h5=env.t('kickstartName', {tier: "{{::profile.backer.tier}}"})
  small=env.t('kickstartText')
  hr

div(ng-if='profile.achievements.streak || user._id == profile._id')
  .achievement.achievement-thermometer(ng-show='profile.achievements.streak')
  div(ng-class='{muted: !profile.achievements.streak}')
    h5(ng-show='profile.achievements.streak > 1 || !profile.achievements.streak')
      | {{profile.achievements.streak || 0 }}&nbsp;
      =env.t('streakName')
    small(ng-show='profile.achievements.streak > 1 || !profile.achievements.streak')=env.t('streakText', {streaks: "{{profile.achievements.streak || 0 }}"})
    h5(ng-show='profile.achievements.streak == 1')
      =env.t('streakSingular')
    small(ng-show='profile.achievements.streak == 1')=env.t('streakSingularText')
  hr
div(ng-if='profile.achievements.perfect || user._id == profile._id')
  .achievement.achievement-perfect(ng-show='profile.achievements.perfect')
  div(ng-class='{muted: !profile.achievements.perfect}')
    h5(ng-show='profile.achievements.perfect > 1 || !profile.achievements.perfect')
      | {{profile.achievements.perfect || 0 }}&nbsp;
      =env.t('perfectName')
    small(ng-show='profile.achievements.perfect > 1 || !profile.achievements.perfect')=env.t('perfectText', {perfects: "{{profile.achievements.perfect || 0 }}"})
    h5(ng-show='profile.achievements.perfect == 1')
      =env.t('perfectSingular')
    small(ng-show='profile.achievements.perfect == 1')=env.t('perfectSingularText')
  hr

//-div(ng-if='profile.achievements.ultimateGear || user._id == profile._id')
  .achievement.achievement-armor(ng-show='profile.achievements.ultimateGear')
  div(ng-class='{muted: !profile.achievements.ultimateGear}')
    h5=env.t('ultimGearName')
    small=env.t('ultimGearText')
  hr
// Remove the following when ultimate gear is fixed (https://github.com/HabitRPG/habitrpg/issues/2232):
div(ng-if='::user._id == profile._id')
  div.muted
    h5=env.t('ultimGearName')
    small <a href='https://github.com/HabitRPG/habitrpg/issues/2232' target='_blank'>Returning soon</a>
  hr

div(ng-if='profile.achievements.beastMaster || user._id == profile._id')
  .achievement.achievement-rat(ng-show='profile.achievements.beastMaster')
  div(ng-class='{muted: !profile.achievements.beastMaster}')
    h5=env.t('beastMasterName')
    small=env.t('beastMasterText')
    small(ng-if='profile.achievements.beastMasterCount')
      =env.t('beastMasterText2', {count: "{{profile.achievements.beastMasterCount}}"})
  hr

div(ng-if='profile.achievements.mountMaster || user._id == profile._id')
  .achievement.achievement-wolf(ng-show='profile.achievements.mountMaster')
  div(ng-class='{muted: !profile.achievements.mountMaster}')
    h5=env.t('mountMasterName')
    small=env.t('mountMasterText')
    small(ng-if='profile.achievements.mountMasterCount')
      =env.t('mountMasterText2', {count: "{{profile.achievements.mountMasterCount}}"})
  hr

div(ng-if='profile.achievements.triadBingo || user._id == profile._id')
  .achievement.achievement-wolf(ng-show='profile.achievements.triadBingo')
  div(ng-class='{muted: !profile.achievements.triadBingo}')
    h5=env.t('triadBingoName')
    small=env.t('triadBingoText')
    small(ng-if='profile.achievements.triadBingoCount')
      =env.t('triadBingoText2', {count: "{{profile.achievements.triadBingoCount}}"})
  hr

div(ng-if='profile.achievements.rebirths')
  .achievement.achievement-sun
  h5(ng-if='profile.achievements.rebirths == 1')=env.t('rebirthBegan')
  h5(ng-if='profile.achievements.rebirths > 1')
    =env.t('rebirthText', {rebirths: "{{profile.achievements.rebirths}}"})
  small
    =env.t('rebirthOrb')
    |&nbsp;{{profile.achievements.rebirthLevel}}.
  hr

div(ng-if='::profile.achievements.helpedHabit')
  .achievement.achievement-tree
  h5=env.t('helped')
  small
    =env.t('helpedText1')
    |&nbsp;
    a(href='http://community.habitrpg.com/node/290', target='_blank')=env.t('helpedText2')
  hr

div(ng-if=':: profile.achievements.originalUser || profile.achievements.veteran')
  .achievement.achievement-cake
  div(ng-if='::profile.achievements.veteran')
    h5=env.t('veteran')
    small=env.t('veteranText')
  div(ng-if='::profile.achievements.originalUser')
    h5=env.t('originalUser')
    small!=env.t('originalUserText')
  hr

div(ng-if='profile.achievements.challenges || user._id == profile._id')
  // This is a very strange icon to use. revisit
  .achievement.achievement-karaoke(ng-show='profile.achievements.challenges')
  div(ng-class='{muted: !profile.achievements.challenges}')
    h5=env.t('challengeWinner')
    table.table.table-striped
      tr(ng-repeat='chal in profile.achievements.challenges track by $index')
        td {{::chal}}
  hr

div(ng-if='profile.achievements.quests || user._id == profile._id')
  .achievement.achievement-alien(ng-show='profile.achievements.quests')
  div(ng-class='{muted: !profile.achievements.quests}')
    h5=env.t('completedQuests')
    table.table.table-striped
      tr(ng-repeat='(k,v) in profile.achievements.quests')
        td {{::Content.quests[k].text()}}
        td x{{v}}
  hr

div(ng-if='profile.achievements.snowball')
  .achievement.achievement-snowball
  h5=env.t('annoyingFriends')
  small
    =env.t('annoyingFriendsText', {snowballs: "{{profile.achievements.snowball}}"})
  hr

div(ng-if='profile.achievements.spookDust')
  .achievement.achievement-spookDust
  h5=env.t('alarmingFriends')
  small
    =env.t('alarmingFriendsText', {spookDust: "{{profile.achievements.spookDust}}"})
  hr

div(ng-if='::profile.achievements.habitBirthday')
  .achievement.achievement-habitBirthday
  h5=env.t('habitBirthday')
  small
    =env.t('habitBirthdayText')
  hr

div(ng-if='::profile.achievements.valentine')
  .achievement.achievement-valentine
  h5=env.t('adoringFriends')
  small
    =env.t('adoringFriendsText', {cards: "{{::profile.achievements.valentine}}"})
  hr

div(ng-if='::profile.achievements.quests.dilatory')
  .achievement.achievement-dilatory
  h5=env.t('achievementDilatory')
  small
    =env.t('achievementDilatoryText')
  hr

div(ng-if='::profile.achievements.costumeContest')
  .achievement.achievement-costumeContest
  h5=env.t('costumeContest')
  small
  =env.t('costumeContestText')
  hr

div(ng-if='::profile.achievements.nye')
  .achievement.achievement-nye
  h5=env.t('auldAcquaintance')
  small
    =env.t('auldAcquaintanceText', {cards: "{{::profile.achievements.nye}}"})
  hr

div(ng-if='::profile.achievements.quests.stressbeast')
  .achievement.achievement-stoikalm
  h5=env.t('achievementStressbeast')
  small
    =env.t('achievementStressbeastText')
  hr
