<xf:title>{{ phrase('following') }}</xf:title>

<xf:wrap template="account_wrapper" />

<div class="block">
	<div class="block-container">
		<ol class="block-body">
			<xf:foreach loop="$following" value="$user">
				<li class="block-row block-row--separated">
					<xf:set var="$switchLink">
						<xf:if is="$xf.visitor.canFollowUser($user)">
							<xf:button href="{{ link('members/follow', $user) }}"
								class="button--link"
								data-xf-click="switch"
								data-sk-follow="{{ phrase('follow') }}"
								data-sk-unfollow="{{ phrase('unfollow') }}">
								{{ $xf.visitor.isFollowing($user) ? phrase('unfollow') : phrase('follow') }}
							</xf:button>
						</xf:if>
					</xf:set>
					<xf:macro template="member_list_macros" name="item"
						arg-user="{$user}"
						arg-extraData="{$switchLink}" />
				</li>
			<xf:else />
				<div class="block-row">{{ phrase('you_not_currently_following_any_members') }}</div>
			</xf:foreach>
		</ol>
	</div>
</div>