<?php
/**
 * @var $tabs
 * @var $active_tab
 * @var $function_name
 */
?>

<div class="ui basic notpadded segment mt0 tab-to-dropdown js-tab-to-dropdown">

	<div class="ui secondary menu wpj-tabs-menu">

		<?php foreach ( $tabs as $key => $button_label ) { ?>

			<div class="item teb-item js-tab-item<?php echo ( $active_tab == $key ? ' active' : '' ); ?>" data-tab="<?php echo $key; ?>">

				<?php echo $button_label;

				if ( $function_name ) { ?>

					<span class="item-count ticket-count-<?php echo $key; ?>"><?php echo $function_name( get_current_user_id(), $key ); ?></span>

				<?php } ?>

			</div>

		<?php } ?>

	</div>

</div>