<?php $replies = Wo_CountCommentReplies($wo['comment']['id']);?>
<div class="comment comment-container" id="comment_<?php echo $wo['comment']['id'];?>" data-comment-id ="<?php echo $wo['comment']['id'];?>">
   <a onclick="InjectAPI('{&quot;profile_id&quot; : &quot;<?php echo $wo['comment']['publisher']['id']?>&quot;, &quot;type&quot;:&quot;<?php echo $wo['comment']['publisher']['type']?>&quot;}', event);" class="<?php echo Wo_RightToLeft('pull-left'); ?>" href="<?php echo $wo['comment']['publisher']['url']?>">
      <img class="avatar <?php echo Wo_RightToLeft('pull-left'); ?>" src="<?php echo $wo['comment']['publisher']['avatar']?>" alt="avatar">
   </a>
   <div class="comment-body">
      <div class="comment-heading">
         <span class="user-popover" data-id="<?php echo $wo['comment']['publisher']['id'];?>" data-type="<?php echo $wo['comment']['publisher']['type'];?>">
            <a href="<?php echo $wo['comment']['publisher']['url']?>" data-ajax="?link1=timeline&u=<?php echo $wo['comment']['publisher']['username'];?>" onclick="InjectAPI('{&quot;profile_id&quot; : &quot;<?php echo $wo['comment']['publisher']['id']?>&quot;, &quot;type&quot;:&quot;<?php echo $wo['comment']['publisher']['type']?>&quot;}', event);">
               <h4 class="user">
               <?php echo $wo['comment']['publisher']['name']?>
               </h4>
            </a>
         </span>
         <?php  if($wo['comment']['publisher']['verified'] == 1) {   ?>
         <span class="verified-color" data-toggle="tooltip" title="<?php echo $wo['lang']['verified_user'];?>"><i class="fa fa-check-circle"></i></span>
         <?php } ?>
         <div class="<?php echo Wo_RightToLeft('pull-right');?> comment-options comment_edele_options">
            
            <?php if ( $wo['config']['comment_reports'] == 1 && $wo['comment']['onwer'] !== true){ ?>
                <span class="pointer comment-icons" id="reportComment<?php echo $wo['comment']['id']?>" onclick="Wo_ReportComment(<?php echo $wo['comment']['id']?>);" title="<?php echo $wo['lang']['report_comment']; ?>" >
                <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-alert-octagon"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line></svg>
                </span>
            <?php } ?>

            <?php if ($wo['comment']['onwer'] === true) { ?>
            <span class="pointer comment-icons" id="editComment" onclick="Wo_OpenCommentEditBox(<?php echo $wo['comment']['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>
            <?php } ?>
            <?php if ($wo['comment']['post_onwer'] === true || $wo['comment']['onwer'] === true || Wo_IsAdmin()) {?>
            <span class="pointer" id="deleteComment" onclick="Wo_DeleteComment(<?php echo $wo['comment']['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>
         <span class="time ajax-time" title="<?php echo date('c',$wo['comment']['time']);?>"><?php echo $wo['comment']['time']?></span>
         <div class="comment-text"><?php echo $wo['comment']['text']?></div>
         <div class="comment-image">
            <?php if (!empty($wo['comment']['c_file'])): ?>
               <span data-href="<?php echo Wo_GetMedia($wo['comment']['c_file']);?>" onclick="Wo_OpenLighteBox(this,event);" class="pointer">
               <img src="<?php echo Wo_GetMedia($wo['comment']['c_file']);?>" alt="Comment image">
               </span>
            <?php endif ?>
         </div>
         <?php if (!empty($wo['comment']['record'])): ?>
            <div class="comment-record">
            <audio controls preload="auto">
                <source src="<?php echo Wo_GetMedia($wo['comment']['record']);?>" type="audio/wav">
            </audio>
            <style>
            .mejs-container {
               width: 100% !important;
               margin-left: auto;
                margin-right: auto;
            }
            </style>
            <script>
            $('audio').mediaelementplayer();
            </script>

            </div>
         <?php endif;?>
         
         <div class="clear"></div>
      </div>

        <?php if ($wo['config']['second_post_button'] == 'reaction') { ?>
            <!-- reaction -->
            <div class="like-stat stat-item post-like-status" id="comment_reacted">
              <span class="like-emo comment-reactions-icons-<?php echo $wo['comment']['id']; ?>">
              <?php echo Wo_GetPostReactions($wo['comment']['id'],"comment");?>
              </span>
            </div>
        <?php } ?>
		
      <span class="comment-options">
        <?php if ($wo['config']['second_post_button'] == 'reaction') { ?>
			<div class="wo-reaction wo-reaction-comment stat-item" id="comment_reactions" data-id="<?php echo $wo['comment']['id']; ?>">
                <span class="like-btn like-btn-comment" data-id="<?php echo $wo['comment']['id']; ?>">
                    <?php
                    if (Wo_IsReacted($wo['comment']['id'], $wo['user']['user_id'], "comment") === true) {    
                        echo '<span class="comment-status-reaction-'.$wo['comment']['id'].' active-like 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="c_likes-'.$wo['comment']['id'].'"></span></span>'; 
                    } else {   
                        echo '<span class="comment-status-reaction-'.$wo['comment']['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="c_likes'.$wo['comment']['id'].'"></span></span>';   
                    }    
                    ?>
                </span>
                <ul class="reactions-box reactions-comment-container-<?php echo $wo['comment']['id']; ?>" data-id="<?php echo $wo['comment']['id']; ?>">
                    <li class="reaction reaction-like animated_2" data-reaction="Like" onclick="Wo_RegisterCommentReaction(<?php echo $wo['comment']['id']; ?>,'Like');">
						<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" onclick="Wo_RegisterCommentReaction(<?php echo $wo['comment']['id']; ?>,'Love');">
						<div class="emoji emoji--love">
							<div class="emoji__heart"></div>
						</div>
					</li>
                    <li class="reaction reaction-haha animated_6" data-reaction="HaHa" onclick="Wo_RegisterCommentReaction(<?php echo $wo['comment']['id']; ?>,'HaHa');">
						<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" onclick="Wo_RegisterCommentReaction(<?php echo $wo['comment']['id']; ?>,'Wow');">
						<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" onclick="Wo_RegisterCommentReaction(<?php echo $wo['comment']['id']; ?>,'Sad');">
						<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" onclick="Wo_RegisterCommentReaction(<?php echo $wo['comment']['id']; ?>,'Angry');">
						<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{ ?>
            <span class="comment-icons">
                <span class="pointer" id="LikeComment" onclick="Wo_RegisterCommentLike(<?php echo $wo['comment']['id']; ?>);">
                <?php if($wo['comment']['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-likes" class="pointer" onclick="Wo_OpenPostLikedUsers(<?php echo $wo['comment']['id']; ?>,'comment')">
                <?php echo $wo['comment']['comment_likes'];?>
                </span> ·
            </span>
            <span class="pointer" id="WonderComment" onclick="Wo_RegisterCommentWonder(<?php echo $wo['comment']['id']; ?>);">
                <?php if($wo['comment']['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-wonders" class="pointer" onclick="Wo_OpenPostWonderedUsers(<?php echo $wo['comment']['id']; ?>,'comment')">
                <?php echo $wo['comment']['comment_wonders'];?>
            </span>
         <?php } ?>
         <?php if ($replies == 0) { ?>
         ·
         <span class="pointer" id="ReplyComment" onclick="Wo_OpenReplyBox(<?php echo $wo['comment']['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-message-circle"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path></svg>
         </span>
         <span id="comment-replies">
            <?php echo $replies;?>
         </span>
         <?php } ?>
      </span>
      <div class="comment-edit">
         <textarea onkeydown="textAreaAdjust(this, 26)" class="edit-box form-control" onkeyup="Wo_EditComment(this.value,<?php echo $wo['comment']['id']?>, event)" placeholder="Edit Comment" dir="auto"  id="edit_comment_<?php echo $wo['comment']['id']?>"><?php echo $wo['comment']['Orginaltext']?></textarea>
      </div>
      <div class="comment-replies">
         <div class="comment-replies-text">
            <div class="reply-container"></div>
         </div>
         <?php if ($replies > 0) { ?>
         <div class="view-more-replies" onclick="Wo_ViewMoreReplies(<?php echo $wo['comment']['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-corner-down-right" style="margin-top: -3px;"><polyline points="15 10 20 15 15 20"></polyline><path d="M4 4v7a4 4 0 0 0 4 4h12"></path></svg> <?php echo $replies;?> <?php echo ($replies == 1)? $wo['lang']['reply'] : $wo['lang']['replies']?>
         </div>
         <?php } ?>
         <div class="comment-reply">
			<div class="wo_commreply_combo" id="post-<?php echo $wo["comment"]["id"];?>">
				<img class="avatar" src="<?php echo $wo['user']['avatar'];?>"/>
				<textarea onkeyup="textAreaAdjust(this, 26)" class="reply-box form-control textarea comment-reply-textarea" onkeydown="Wo_RegisterReply(this.value,<?php echo $wo['comment']['id']; ?>,<?php echo $wo['story']['publisher']['user_id']; ?>, event, <?php echo (!empty($wo['story']['publisher']['page_id'])) ? $wo['story']['publisher']['page_id'] : '0'; ?>)" placeholder="<?php echo $wo['lang']['reply_to_comment'];?>" dir="auto"></textarea>
			

         <div class="image-comment">
          <span data-toggle="dropdown" role="button" aria-expanded="false" style="text-decoration: none;cursor: pointer;" onclick="load_ajax_reply_emojii('<?php echo $wo["comment"]["id"];?>','<?php echo $wo['config']['theme_url'];?>/emoji/');" class="emo-comment2" >
            <span class="btn btn-file">
               <svg fill="#009da0" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" class="feather feather-user-plus">
                  <path d="M0 0h24v24H0z" fill="none"/>
                  <path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"/>
               </svg>
            </span>
         </span>
         <ul class="dropdown-menu dropdown-menu-right emo-comment-container-<?php echo $wo["comment"]["id"];?>" id="wo_comm_emojis"></ul>


            <form action="#" method="post" class="hidden">
               <input accept="image/x-png, image/jpeg" type="file" name="comment_image" id="comment_reply_image_<?php echo $wo['comment']['id']; ?>" onchange="Wo_UploadReplyCommentImage(<?php echo $wo['comment']['id']; ?>);">
               <input type="hidden" value="" id="comment_src_image_<?php echo $wo['comment']['id']; ?>">
            </form>
            <div class="comment-btn-wrapper">
               <span class="btn btn-file btn-upload-comment">
                  <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-image" color="#009da0" onclick="document.getElementById('comment_reply_image_<?php echo $wo['comment']['id'];?>').click(); return false">
                     <rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
                     <circle cx="8.5" cy="8.5" r="1.5"></circle>
                     <polyline points="21 15 16 10 5 21"></polyline>
                  </svg>
               </span>
            </div>

         </div>
		 </div>
<div class="comment-reply-image-<?php echo $wo['comment']['id']; ?> comment-image-con"></div>
      <div class="clear"></div>



            <div id="hidden_inputbox_comment_reply"></div>
         </div>
      </div>
   </div>
   <?php echo Wo_LoadPage('modals/delete-comment');?>
   <script>
   $(function () {
   $("#comment_<?php echo $wo['comment']['id'];?> .comment-text").readmore({
   speed: 75,
   moreLink: '<a href="#" class="hash font-13"><?php echo $wo["lang"]["read_more"];?></a>',
   lessLink: '<a href="#" class="hash font-13"><?php echo $wo["lang"]["read_less"];?></a>',
   });
   $("#comment_<?php echo $wo['comment']['id']; ?> .comment-reply input").triggeredAutocomplete({
   hidden: '#hidden_inputbox_comment_reply',
   source: Wo_Ajax_Requests_File() + "?f=mention",
   trigger: "@"
   });
   
   });
   </script>
</div>