<?php if ($wo['config']['second_post_button'] == 'reaction') { ?>
	<!-- reaction -->
	<?php if ( isset($wo['story']['viewmode']) && $wo['story']['viewmode'] == 'lightbox') { ?>
    <div class="wo-reaction wo-reaction-lightbox stat-item unselectable" data-id="<?php echo $wo['story']['id']; ?>">
		<span class="like-btn like-btn-lightbox unselectable" data-id="<?php echo $wo['story']['id']; ?>" >
			<?php
				if ($wo['loggedin'] && Wo_IsReacted($wo['story']['id'], $wo['user']['user_id']) === true) {    
					echo Wo_GetReactedTextIcon($wo['story']['id'], $wo['user']['user_id']);
				} else {   
					echo '<span class="status-reaction-'.$wo['story']['id'].' unselectable"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg> <span class="t_likes'.$wo['story']['id'].'"></span> ' . $wo['lang']['like'] . '</span>';   
				}    
			?>
		</span>
		<ul class="reactions-box reactions-lightbox-container-<?php echo $wo['story']['id']; ?> unselectable" data-id="<?php echo $wo['story']['id']; ?>" style="<?php if ($wo['language_type'] == 'rtl') {?> left: auto; <?php }else{ ?> right: auto; <?php }?>">

			<?php if (!empty($wo['reactions_types'])) {
			    foreach ($wo['reactions_types'] as $key => $value) {
			    	if ($value['status'] == 1) {
			     ?>
				<li class="reaction reaction-<?php echo $value['id'];?> animated_2" data-reaction="<?php echo $value['name'];?>" data-reaction-id="<?php echo $value['id'];?>" data-reaction-lang="<?php echo $value['name'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this,'<?php echo($value['sunshine_small_icon']) ?>');">
					<img class="" src="<?php echo $value['sunshine_icon'];?>" alt="<?php echo $value['name'];?>">
				</li>
			<?php } } } ?>


			<!-- <li class="reaction reaction-like animated_2" data-reaction="Like" data-reaction-lang="<?php echo $wo['lang']['like'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<img class="" src="<?php echo $wo['config']['theme_url'];?>/reaction/like.gif" alt="<?php echo $wo['lang']['like'];?>">
			</li>
			<li class="reaction reaction-love animated_4" data-reaction="Love" data-reaction-lang="<?php echo $wo['lang']['love'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<img class="" src="<?php echo $wo['config']['theme_url'];?>/reaction/love.gif" alt="<?php echo $wo['lang']['love'];?>">
			</li>
			<li class="reaction reaction-haha animated_6" data-reaction="HaHa" data-reaction-lang="<?php echo $wo['lang']['haha'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<img class="" src="<?php echo $wo['config']['theme_url'];?>/reaction/haha.gif" alt="<?php echo $wo['lang']['haha'];?>">
			</li>
			<li class="reaction reaction-wow animated_8" data-reaction="Wow" data-reaction-lang="<?php echo $wo['lang']['wow'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<img class="" src="<?php echo $wo['config']['theme_url'];?>/reaction/wow.gif" alt="<?php echo $wo['lang']['wow'];?>">
			</li>
			<li class="reaction reaction-sad animated_10" data-reaction="Sad" data-reaction-lang="<?php echo $wo['lang']['sad'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<img class="" src="<?php echo $wo['config']['theme_url'];?>/reaction/sad.gif" alt="<?php echo $wo['lang']['sad'];?>">
			</li>
			<li class="reaction reaction-angry animated_12" data-reaction="Angry" data-reaction-lang="<?php echo $wo['lang']['angry'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<img class="" src="<?php echo $wo['config']['theme_url'];?>/reaction/angry.gif" alt="<?php echo $wo['lang']['angry'];?>">
			</li> -->
		</ul>
	</div>
	
	<?php } else { 
		?>

	<div class="wo-reaction wo-reaction-post stat-item unselectable" data-id="<?php echo $wo['story']['id']; ?>">
		<span class="like-btn like-btn-post unselectable"  data-id="<?php echo $wo['story']['id']; ?>"  id="react_<?php echo $wo['story']['id']; ?>" <?php if ($wo['loggedin'] && Wo_IsReacted($wo['story']['id'], $wo['user']['user_id'])) { ?> data_react="1" <?php }else{ ?> data_react="0"<?php } ?> data-reaction-id="<?php echo $wo['reactions_types'][1]['id'];?>"  data-reaction="Like" data-reaction-lang="<?php echo $wo['lang']['like'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReactionLike(this,'<?php echo($wo['reactions_types'][1]['sunshine_small_icon']) ?>');">
			<?php
				if ($wo['loggedin'] && Wo_IsReacted($wo['story']['id'], $wo['user']['user_id']) === true) {    
					echo Wo_GetReactedTextIcon($wo['story']['id'], $wo['user']['user_id']);
				} else {   
					echo '<span class="status-reaction-'.$wo['story']['id'].' unselectable"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> <path fill="currentColor" d="M23,10C23,8.89 22.1,8 21,8H14.68L15.64,3.43C15.66,3.33 15.67,3.22 15.67,3.11C15.67,2.7 15.5,2.32 15.23,2.05L14.17,1L7.59,7.58C7.22,7.95 7,8.45 7,9V19A2,2 0 0,0 9,21H18C18.83,21 19.54,20.5 19.84,19.78L22.86,12.73C22.95,12.5 23,12.26 23,12V10M1,21H5V9H1V21Z"></path> </svg> <span class="t_likes'.$wo['story']['id'].'"></span><span class="like-btn-mobile">' . $wo['lang']['like'] . '</span></span>';   
				}    
			?>
		</span>
		<ul class="reactions-box reactions-box-container-<?php echo $wo['story']['id']; ?>" data-id="<?php echo $wo['story']['id']; ?>" style="<?php if ($wo['language_type'] == 'rtl') {?> left: auto; <?php }else{ ?> right: auto; <?php }?>">
			<?php if (!empty($wo['reactions_types'])) {
			    foreach ($wo['reactions_types'] as $key => $value) {
			    	if ($value['status'] == 1) {
			     ?>
				<li class="reaction reaction-<?php echo $value['id'];?> animated_2" data-reaction="<?php echo $value['name'];?>" data-reaction-id="<?php echo $value['id'];?>" data-reaction-lang="<?php echo $value['name'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this,'<?php echo($value['sunshine_small_icon']) ?>');">
					<img class="" src="<?php echo $value['sunshine_icon'];?>" alt="<?php echo $value['name'];?>">
				</li>
			<?php } } } ?>
			<!-- <li class="reaction reaction-like animated_2" data-reaction="Like" data-reaction-lang="<?php echo $wo['lang']['like'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<img class="" src="<?php echo $wo['config']['theme_url'];?>/reaction/like.gif" alt="<?php echo $wo['lang']['like'];?>">
			</li>
			<li class="reaction reaction-love animated_4" data-reaction="Love" data-reaction-lang="<?php echo $wo['lang']['love'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<img class="" src="<?php echo $wo['config']['theme_url'];?>/reaction/love.gif" alt="<?php echo $wo['lang']['love'];?>">
			</li>
			<li class="reaction reaction-haha animated_6" data-reaction="HaHa" data-reaction-lang="<?php echo $wo['lang']['haha'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<img class="" src="<?php echo $wo['config']['theme_url'];?>/reaction/haha.gif" alt="<?php echo $wo['lang']['haha'];?>">
			</li>
			<li class="reaction reaction-wow animated_8" data-reaction="Wow" data-reaction-lang="<?php echo $wo['lang']['wow'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<img class="" src="<?php echo $wo['config']['theme_url'];?>/reaction/wow.gif" alt="<?php echo $wo['lang']['wow'];?>">
			</li>
			<li class="reaction reaction-sad animated_10" data-reaction="Sad" data-reaction-lang="<?php echo $wo['lang']['sad'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<img class="" src="<?php echo $wo['config']['theme_url'];?>/reaction/sad.gif" alt="<?php echo $wo['lang']['sad'];?>">
			</li>
			<li class="reaction reaction-angry animated_12" data-reaction="Angry" data-reaction-lang="<?php echo $wo['lang']['angry'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<img class="" src="<?php echo $wo['config']['theme_url'];?>/reaction/angry.gif" alt="<?php echo $wo['lang']['angry'];?>">
			</li> -->
		</ul>
	</div>
	<?php } ?>

<?php }else{ ?>

  <!-- Normal Like -->
  <span <?php echo(PatreonPostSubscribed($wo['story']['user_id'],$wo['story']['id']) ? 'onclick="Wo_RegisterLike('.$wo['story']['id'].');"' : '') ?> id="like-button" class="btn btn-default stat-item" title="<?php echo $wo['lang']['like'];?>">
  <?php
	if ($wo['story']['is_liked'] === true) {
		echo GetModeBtn('liked_btn');
	} else {   
		echo GetModeBtn('like_btn');
  }
  $second_btn_wonder = ($wo['config']['second_post_button'] == 'dislike') ? $wo['lang']['dislike'] : $wo['lang']['wonder'];
  $second_btn_wondered = ($wo['config']['second_post_button'] == 'dislike') ? $wo['lang']['disliked'] : $wo['lang']['wondered'];
	   
  ?>
  </span>
  <?php if ($wo['config']['second_post_button'] != 'disabled') { ?>
  <span <?php echo(PatreonPostSubscribed($wo['story']['user_id'],$wo['story']['id']) ? 'onclick="Wo_RegisterWonder('.$wo['story']['id'].');"' : '') ?> id="wonder-button" class="btn btn-default stat-item" title="<?php echo $wo['second_post_button_text'];?>">
  <?php 
  if ($wo['story']['is_wondered'] === true) {  
    echo '<span class="active-wonder">' . $wo['second_post_button_icon'] . '<span class="like-btn-mobile">' . $second_btn_wondered . '</span></span>'; 
  } else {    
    echo '' . $wo['second_post_button_icon'] . ' <span class="like-btn-mobile">' . $second_btn_wonder . '</span>';
  }
  ?>          
  </span>
  <?php } ?>

<?php } ?>