<?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" class="feather feather-thumbs-up"><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'];?>" 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['wowonder_small_icon']) ?>',<?php echo($value['is_html']) ?>);">
					<?php if (preg_match("/<[^<]+>/",$value['wowonder_icon'],$m)) {
						  	echo($value['wowonder_icon']);
						 }
						 else{ ?>
				     	<img src="<?php echo($value['wowonder_icon']) ?>">
				    <?php } ?>
				</li>
			<?php } } } ?>



			<!-- <li class="reaction reaction-like" data-reaction="Like" data-reaction-lang="<?php echo $wo['lang']['like'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<div class="emoji emoji--like">
					<div class="emoji__hand"><div class="emoji__thumb"></div></div>
				</div>
			</li>
			<li class="reaction reaction-love" data-reaction="Love" data-reaction-lang="<?php echo $wo['lang']['love'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<div class="emoji emoji--love">
					<div class="emoji__heart"></div>
				</div>
			</li>
			<li class="reaction reaction-haha" data-reaction="HaHa" data-reaction-lang="<?php echo $wo['lang']['haha'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<div class="emoji emoji--haha">
					<div class="emoji__face">
						<div class="emoji__eyes"></div>
						<div class="emoji__mouth">
							<div class="emoji__tongue"></div>
						</div>
					</div>
				</div>
			</li>
			<li class="reaction reaction-wow" data-reaction="Wow" data-reaction-lang="<?php echo $wo['lang']['wow'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<div class="emoji emoji--wow">
					<div class="emoji__face">
						<div class="emoji__eyebrows"></div>
						<div class="emoji__eyes"></div>
						<div class="emoji__mouth"></div>
					</div>
				</div>
			</li>
			<li class="reaction reaction-sad" data-reaction="Sad" data-reaction-lang="<?php echo $wo['lang']['sad'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<div class="emoji emoji--sad">
					<div class="emoji__face">
						<div class="emoji__eyebrows"></div>
						<div class="emoji__eyes"></div>
						<div class="emoji__mouth"></div>
					</div>
				</div>
			</li>
			<li class="reaction reaction-angry" data-reaction="Angry" data-reaction-lang="<?php echo $wo['lang']['angry'];?>" data-post-id="<?php echo $wo['story']['id']; ?>" onclick="Wo_RegisterReaction(this);">
				<div class="emoji emoji--angry">
					<div class="emoji__face">
						<div class="emoji__eyebrows"></div>
						<div class="emoji__eyes"></div>
						<div class="emoji__mouth"></div>
					</div>
				</div>
			</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]['wowonder_small_icon']) ?>',<?php echo($wo['reactions_types'][1]['is_html']) ?>);">
			<?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" class="feather feather-thumbs-up"><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-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'];?>" 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['wowonder_small_icon']) ?>',<?php echo($value['is_html']) ?>);">
					<?php if (preg_match("/<[^<]+>/",$value['wowonder_icon'],$m)) {
						  	echo($value['wowonder_icon']);
						 }
						 else{ ?>
				     	<img src="<?php echo($value['wowonder_icon']) ?>">
				    <?php } ?>
				</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);">
				<div class="emoji emoji--like">
					<div class="emoji__hand"><div class="emoji__thumb"></div></div>
				</div>
			</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);">
				<div class="emoji emoji--love">
					<div class="emoji__heart"></div>
				</div>
			</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);">
				<div class="emoji emoji--haha">
					<div class="emoji__face">
						<div class="emoji__eyes"></div>
						<div class="emoji__mouth">
							<div class="emoji__tongue"></div>
						</div>
					</div>
				</div>
			</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);">
				<div class="emoji emoji--wow">
					<div class="emoji__face">
						<div class="emoji__eyebrows"></div>
						<div class="emoji__eyes"></div>
						<div class="emoji__mouth"></div>
					</div>
				</div>
			</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);">
				<div class="emoji emoji--sad">
					<div class="emoji__face">
						<div class="emoji__eyebrows"></div>
						<div class="emoji__eyes"></div>
						<div class="emoji__mouth"></div>
					</div>
				</div>
			</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);">
				<div class="emoji emoji--angry">
					<div class="emoji__face">
						<div class="emoji__eyebrows"></div>
						<div class="emoji__eyes"></div>
						<div class="emoji__mouth"></div>
					</div>
				</div>
			</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
	  $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'];
	  if ($wo['story']['is_liked'] === true) {    
	    echo GetModeBtn('liked_btn');  
	  } else {   
	    echo GetModeBtn('like_btn');
	  } 
  ?>
  </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 } ?>