<?php $haya_favorite_check_favorite = haya_favorite_find_by_uid_and_tid($uid, $tid); ?>

<style>
.haya-favoriter {
	position: relative;
}
.haya-favorite-show-users {
	position: absolute;
	top: 5px;
	z-index: 100;
	width: 100%;
}
.haya-favorite-show-users .haya-favorite-users {
	max-height: 250px;
	overflow-y: auto;
}
</style>

<div class="haya-favoriter px-2">
	<span class="btn-group haya-favoriter-info" role="group">
		<?php if (!empty($uid)) { ?>
			<?php if($haya_favorite_check_favorite){ ?>
				<span class="btn001 js-haya-favorite-del" data-tid="<?php echo $tid;?>" title="<?php echo lang('haya_favorite_delete_favorite'); ?>">
					<i class="icon iconfont icon-fav yzyz" aria-label="<?php echo lang('haya_favorite_delete_favorite'); ?>"></i>
					
				</span>
			<?php } else { ?>
				<span class="btn001 js-haya-favorite-add" data-tid="<?php echo $tid;?>" title="<?php echo lang('haya_favorite_add_favorite'); ?>">
					<i class="icon iconfont icon-fav-1 wzwz" aria-label="<?php echo lang('haya_favorite_add_favorite'); ?>"></i>
					
				</span>
			<?php } ?>	
		<?php } else { ?>
			<span class="btn001 js-haya-favorite-tip" data-tid="<?php echo $tid;?>" title="<?php echo lang('haya_favorite_add_favorite'); ?>">
				<i class="icon iconfont icon-fav-1" aria-label="<?php echo lang('haya_favorite_add_favorite'); ?>"></i>
				
			</span>
		<?php } ?>

		<span class="js-haya-favorite-show-users" data-tid="<?php echo $tid;?>" title="<?php echo lang('haya_favorite_show_favorite_users'); ?>">
			<span class="btn001 haya-favorite-user-count"><?php echo intval($thread['favorites']); ?></span>
		</span>
	</span>
</div>

