.nav-sidebar{ class: ("sidebar-icons-only" if collapsed_sidebar?) }
  .nav-sidebar-inner-scroll
    .context-header
      = link_to profile_path, title: 'Profile Settings' do
        .avatar-container.s40.settings-avatar
          = icon('user')
        .sidebar-context-title User Settings
    %ul.sidebar-top-level-items
      = nav_link(path: 'profiles#show', html_options: {class: 'home'}) do
        = sidebar_link profile_path, title: _('Profile Settings') do
          .nav-icon-container
            = custom_icon('profile')
          %span.nav-item-name
            Profile
      = nav_link(controller: [:accounts, :two_factor_auths]) do
        = sidebar_link profile_account_path, title: _('Account') do
          .nav-icon-container
            = custom_icon('account')
          %span.nav-item-name
            Account
      - if current_application_settings.user_oauth_applications?
        = nav_link(controller: 'oauth/applications') do
          = sidebar_link applications_profile_path, title: _('Applications') do
            .nav-icon-container
              = custom_icon('applications')
            %span.nav-item-name
              Applications
      = nav_link(controller: :chat_names) do
        = sidebar_link profile_chat_names_path, title: _('Chat') do
          .nav-icon-container
            = custom_icon('chat')
          %span.nav-item-name
            Chat
      = nav_link(controller: :personal_access_tokens) do
        = sidebar_link profile_personal_access_tokens_path, title: _('Access Tokens') do
          .nav-icon-container
            = custom_icon('access_tokens')
          %span.nav-item-name
            Access Tokens
      = nav_link(controller: :emails) do
        = sidebar_link profile_emails_path, title: _('Emails') do
          .nav-icon-container
            = custom_icon('emails')
          %span.nav-item-name
            Emails
      - unless current_user.ldap_user?
        = nav_link(controller: :passwords) do
          = sidebar_link edit_profile_password_path, title: _('Password') do
            .nav-icon-container
              = custom_icon('lock')
            %span.nav-item-name
              Password
      = nav_link(controller: :notifications) do
        = sidebar_link profile_notifications_path, title: _('Notifications') do
          .nav-icon-container
            = custom_icon('notifications')
          %span.nav-item-name
            Notifications

      = nav_link(controller: :keys) do
        = sidebar_link profile_keys_path, title: _('SSH Keys') do
          .nav-icon-container
            = custom_icon('key')
          %span.nav-item-name
            SSH Keys
      = nav_link(controller: :gpg_keys) do
        = sidebar_link profile_gpg_keys_path, title: _('GPG Keys') do
          .nav-icon-container
            = custom_icon('key_2')
          %span.nav-item-name
            GPG Keys
      = nav_link(controller: :preferences) do
        = sidebar_link profile_preferences_path, title: _('Preferences') do
          .nav-icon-container
            = custom_icon('preferences')
          %span.nav-item-name
            Preferences
      = nav_link(path: 'profiles#audit_log') do
        = sidebar_link audit_log_profile_path, title: _('Authentication log') do
          .nav-icon-container
            = custom_icon('authentication_log')
          %span.nav-item-name
            Authentication log

    = render 'shared/sidebar_toggle_button'
