<?php
 if ($wo['config']['shout_box_system'] == 1 && Wo_CheckAnonymous($wo['reply']['id'],'reply')) {
 	$anonymous = true;
   $wo['reply']['publisher']['username'] = 'anonymous';
   $wo['reply']['publisher']['name'] = $wo['lang']['anonymous'];
   $wo['reply']['publisher']['avatar'] = Wo_GetMedia('upload/photos/incognito.png');
   $wo['reply']['publisher']['verified'] = 0;
   $wo['reply']['publisher']['type'] = '';
   $wo['reply']['publisher']['url'] = 'javascript:void(0)';
} ?>
<div class="reply reply-container" id="comment_reply_<?php echo $wo['reply']['id'];?>" data-reply-id="<?php echo $wo['reply']['id'];?>">
	<?php if (!isset($anonymous)) { ?>
	<a class="<?php echo Wo_RightToLeft('pull-left'); ?>" href="<?php echo $wo['reply']['publisher']['url']?>" onclick="InjectAPI('{&quot;profile_id&quot; : &quot;<?php echo $wo['reply']['publisher']['id']?>&quot;, &quot;type&quot;:&quot;<?php echo $wo['reply']['publisher']['type']?>&quot;}', event);">
		<img class="avatar <?php echo Wo_RightToLeft('pull-left'); ?>" src="<?php echo $wo['reply']['publisher']['avatar']?>" alt="avatar">
	</a>
	<?php }else{ ?>
		<img class="avatar <?php echo Wo_RightToLeft('pull-left'); ?>" src="<?php echo $wo['reply']['publisher']['avatar']?>" alt="avatar">
	<?php } ?>
	<div class="comment-body">
		<div class="<?php echo Wo_RightToLeft('pull-right');?> comment-options comment_edele_options">
            <?php if ($wo['reply']['post_onwer'] === true|| $wo['reply']['onwer'] === true || Wo_IsAdmin()) {?>
				<?php if ($wo['reply']['post_onwer'] === true|| $wo['reply']['onwer'] === true): ?>
					<span class="pointer"  onclick="Wo_EditReplyComment(<?php echo $wo['reply']['id']?>);">
						<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-edit-2"><polygon points="16 3 21 8 8 21 3 21 3 16 16 3"></polygon></svg>
					</span>
					&nbsp;
				<?php endif; ?>
				<span class="pointer" id="deleteComment" onclick="Wo_DeleteReplyComment(<?php echo $wo['reply']['id']?>);">
					<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-trash-2"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>
				</span>           
            <?php } ?>
		</div>
		<div class="comment-heading reply-heading">
			<div class="sun_innr_comm">
				<?php if (!isset($anonymous)) { ?>
				<span class="user-popover" data-id="<?php echo $wo['reply']['publisher']['id'];?>" data-type="<?php echo $wo['reply']['publisher']['type'];?>">
					<a href="<?php echo $wo['reply']['publisher']['url']?>" data-ajax="?link1=timeline&u=<?php echo $wo['reply']['publisher']['username'];?>"  onclick="InjectAPI('{&quot;profile_id&quot; : &quot;<?php echo $wo['reply']['publisher']['id']?>&quot;, &quot;type&quot;:&quot;<?php echo $wo['reply']['publisher']['type']?>&quot;}', event);">
						<h4 class="user"><?php echo $wo['reply']['publisher']['name']?></h4>
					</a>
					<?php  if($wo['reply']['publisher']['verified'] == 1) {   ?>
						<span class="verified-color" title="<?php echo $wo['lang']['verified_user'];?>"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="feather feather-check-circle"><path d="M23,12L20.56,9.22L20.9,5.54L17.29,4.72L15.4,1.54L12,3L8.6,1.54L6.71,4.72L3.1,5.53L3.44,9.21L1,12L3.44,14.78L3.1,18.47L6.71,19.29L8.6,22.47L12,21L15.4,22.46L17.29,19.28L20.9,18.46L20.56,14.78L23,12M10,17L6,13L7.41,11.59L10,14.17L16.59,7.58L18,9L10,17Z"></path></svg></span>
					<?php } ?>
					
					<?php if (!empty($wo['reply']['publisher']['is_open_to_work']) && $wo['config']['website_mode'] == 'linkedin') { ?>
			<span class="wo_open_job_badge" title="<?php echo($wo['lang']['open_to_work']); ?>" data-toggle="tooltip"><svg xmlns="http://www.w3.org/2000/svg" width="11" height="11" viewBox="0 0 24 24"><path fill="currentColor" d="M10,2H14A2,2 0 0,1 16,4V6H20A2,2 0 0,1 22,8V19A2,2 0 0,1 20,21H4C2.89,21 2,20.1 2,19V8C2,6.89 2.89,6 4,6H8V4C8,2.89 8.89,2 10,2M14,6V4H10V6H14Z"></path></svg></span>
		<?php } ?>
				</span>
				<?php }else{ ?>
					<h4 class="user"><?php echo $wo['reply']['publisher']['name']?></h4>
				<?php } ?>
				<div class="reply-text" data-post-comm-reply-text="<?php echo $wo['reply']['id']?>"><?php echo $wo['reply']['text']?></div>
				<div class="comment-image">
            <?php if (!empty($wo['reply']['c_file'])): ?>
               <span data-href="<?php echo Wo_GetMedia($wo['reply']['c_file']);?>" onclick="Wo_OpenLighteBox(this,event);" class="pointer">
               <img src="<?php echo Wo_GetMedia($wo['reply']['c_file']);?>" alt="Comment image">
               </span>
            <?php endif ?>
         </div>
			</div>
			<div class="clear"></div>   
		</div>

        <?php if ($wo['config']['second_post_button'] == 'reaction') { ?>
            <!-- reaction -->
            <div class="like-stat stat-item" id="comment_reacted">
				<span class="like-emo replay-reactions-icons-<?php echo $wo['reply']['id']; ?>">
					<?php echo Wo_GetPostReactions($wo['reply']['id'],"replay");?>
				</span>
            </div>
        <?php } ?>

		<span class="comment-options">
			<?php if ($wo['config']['second_post_button'] == 'reaction') { ?>
				<div class="wo-reaction wo-reaction-replay stat-item" data-id="<?php echo $wo['reply']['id']; ?>" id="comment_reactions">
					<span class="like-btn like-btn-replay" data-id="<?php echo $wo['reply']['id']; ?>">
						<?php
							if (Wo_IsReacted($wo['reply']['id'], $wo['reply']['user_id'],"replay") === true) {    
								echo '<span class="replay-status-reaction-'.$wo['reply']['id'].' active-like"><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="r_likes-'.$wo['reply']['id'].'"></span></span>';   
							} else {   
								echo '<span class="replay-status-reaction-'.$wo['reply']['id'].'"><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="r_likes-'.$wo['reply']['id'].'"></span></span>';   
							}    
						?>
					</span>
					<ul class="reactions-box reactions-box-comment-replay-container-<?php echo $wo['reply']['id']; ?>" data-id="<?php echo $wo['reply']['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'];?>" onclick="Wo_RegisterReplyReaction(<?php echo $wo['reply']['user_id']; ?>,<?php echo $wo['reply']['id']; ?>,<?php echo $value['id'];?>);">
								<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" onclick="Wo_RegisterReplyReaction(<?php echo $wo['reply']['user_id']; ?>,<?php echo $wo['reply']['id']; ?>,'Like');">
							<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" onclick="Wo_RegisterReplyReaction(<?php echo $wo['reply']['user_id']; ?>,<?php echo $wo['reply']['id']; ?>,'Love');">
							<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" onclick="Wo_RegisterReplyReaction(<?php echo $wo['reply']['user_id']; ?>,<?php echo $wo['reply']['id']; ?>,'HaHa');">
							<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" onclick="Wo_RegisterReplyReaction(<?php echo $wo['reply']['user_id']; ?>,<?php echo $wo['reply']['id']; ?>,'Wow');">
							<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" onclick="Wo_RegisterReplyReaction(<?php echo $wo['reply']['user_id']; ?>,<?php echo $wo['reply']['id']; ?>,'Sad');">
							<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" onclick="Wo_RegisterReplyReaction(<?php echo $wo['reply']['user_id']; ?>,<?php echo $wo['reply']['id']; ?>,'Angry');">
							<img class="" src="<?php echo $wo['config']['theme_url'];?>/reaction/angry.gif" alt="<?php echo $wo['lang']['angry'];?>">
						</li> -->
					</ul>
				</div>
			<?php } else { ?>
				<span class="comment-icons">
					<span class="pointer" id="LikeReplyComment" onclick="Wo_RegisterCommentReplyLike(<?php echo $wo['reply']['id']; ?>);">
						<?php if($wo['reply']['is_comment_liked'] !== true) { ?>
							<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>
						<?php } else { ?>
							<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 active-like"><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>
						<?php } ?>
					</span> 
					<span id="comment-reply-likes" class="pointer" onclick="Wo_OpenPostLikedUsers(<?php echo $wo['reply']['id']; ?>,'reply')"><?php echo $wo['reply']['comment_likes'];?></span> · 
				</span>
				<span class="pointer" id="WonderReplyComment" onclick="Wo_RegisterCommentReplyWonder(<?php echo $wo['reply']['id']; ?>);">
					<?php if($wo['reply']['is_comment_wondered'] !== true) { ?>
						<?php echo $wo['second_post_button_icon'];?>
					<?php } else {  ?>
						<span class="active-wonder"><?php echo $wo['second_post_button_icon'];?></span>
					<?php } ?>
				</span>
				<span id="comment-reply-wonders" class="pointer" onclick="Wo_OpenPostWonderedUsers(<?php echo $wo['reply']['id']; ?>,'reply')"><?php echo $wo['reply']['comment_wonders'];?></span>
			<?php } ?>
			 · <span class="time ajax-time" title="<?php echo date('c',$wo['reply']['time']);?>"><?php echo $wo['reply']['time']?></span>
		</span>
		<div class="hidden" data-post-comm-reply-edit="<?php echo $wo['reply']['id']?>">
            <textarea class="edit-box form-control" onkeydown="Wo_UpdatCommReply(<?php echo $wo['reply']['id']?>,event,this)"><?php echo $wo['reply']['Orginaltext']?></textarea>
		</div>
	</div>
	<?php echo Wo_LoadPage('modals/delete-comment-reply');?>
</div>