<div class="media clearfix add-comment-form" style="overflow: visible; padding-top:5px;">
    <?php
		if (isset($uniqueId)) {
			$cloneId = $uniqueId;
		}
		$uniqueId = (isset($uniqueId)) ? $uniqueId : $typeId;
		$origininal_comment_id=0;
		$placeholder=trans('comment.type-your-comment');
		if(isset($comment_id)){
			$origininal_comment_id=$comment_id;
			$placeholder=trans('comment.type-your-reply');
		}
    ?>

    @php
        $isLoggedIn = $isLoggedIn ?? Auth::check();
        $loggedInUserPresenter = $loggedInUserPresenter ?? ($isLoggedIn ? Auth::user()->present() : null);
    @endphp

    @if($isLoggedIn)
 	<div class="media-object pull-left">
        <a href="{{$loggedInUserPresenter->url()}}" data-ajaxify="true">
            <img class="" src="{{$loggedInUserPresenter->getAvatar(50)}}"/>
		</a>
    </div>
   @endif
   
    <div class="media-body" style="overflow: visible; content:''; display:block; float:left; width: calc(100% - 60px); ">
    
        <form {{(isset($cloneId)) ? 'data-cloneid="'.$cloneId.'"' : null}} id="reply-form-{{$type}}-{{$uniqueId}}" data-type="{{$type}}" class="clearfix" data-id="{{$typeId}}" enctype="multipart/form-data" action="" method="post" data-is-login="{{$isLoggedIn}}">
            {{ csrf_field() }}
            
            <input data-type="{{$type}}" data-id="{{$uniqueId}}" id="{{$uniqueId}}-reply-input" autocomplete="off" data-target="#{{$typeId}}-hashtag-mention-suggestion" data-text-limit="{{Config::get('post-text-limit')}}" data-counter-target="#{{$typeId}}-text-counter" class="visible-comment-input-field @if(isset($askUserToCompleteProfile) and $askUserToCompleteProfile!="") {{$askUserToCompleteProfile}} @else mention {{(Config::get('enable-post-text-limit')) ? 'post-text-limit' : null}} @endif" type="text" placeholder="{{$placeholder}}" data-is-login="{{$isLoggedIn}}"/>
            
            <input type="hidden" name="val[type]" value="{{$type}}"/>
            <input type="hidden" name="val[type_id]" value="{{$typeId}}"/>
            <input type="hidden" name="val[comment_id]" value="{{$origininal_comment_id}}"/>
            
            <div class="actions">

            </div>

            <div class="real-comment-form">
                
                <textarea data-height="30" style="height: 50px" id="{{$uniqueId}}-reply-textarea" data-target="#{{$uniqueId}}-hashtag-mention-suggestion" data-text-limit="{{Config::get('post-text-limit')}}" data-counter-target="#{{$uniqueId}}-text-counter" class="@if(isset($usernotidentified) and $usernotidentified!="") {{$usernotidentified}} @elseif(isset($selfnotidentified) and $selfnotidentified!="") {{$selfnotidentified}} @elseif(isset($askUserToCompleteProfile) and $askUserToCompleteProfile!="") {{$askUserToCompleteProfile}} @else mention {{(Config::get('enable-post-text-limit')) ? 'post-text-limit' : null}} @endif" name="val[text]" placeholder="{{$placeholder}}"></textarea>
                
                @if(!$isLoggedIn)
                		<input type="email" name="user_email_address" class="form-control user-email-address-input" autocomplete="off" placeholder='Please enter your email address and click "Post"' />
                @endif
               
                <div class="hashtag-mention-suggestion" id="{{$uniqueId}}-hashtag-mention-suggestion" style="position: relative">
                    <div class="listing" style="border:0px;"></div>
                </div>
                
                @if((isset($usernotidentified) and $usernotidentified!="") || (isset($selfnotidentified) and $selfnotidentified!="")  || (isset($askUserToCompleteProfile) and $askUserToCompleteProfile!=""))
                
                @else
                    <div class="reply-footer" style="text-align:right">
					@if(!$isLoggedIn)
                        	<p style="text-align:right">I agree to the <a target="_blank" href="https://idhubs.com/terms" style="color:#F00;text-decoration:underline">terms</a> of posting</p> 
                        @endif
                         
					@if($isLoggedIn)
                            <span class="racingcommunityhidemenu fileupload fileupload-exists" data-provides="fileupload">
                                  <a  class="btn-file btn">
                                      <img src="{{Theme::asset()->img('theme/images/post-img-icon.png')}}"/>
                                      <input title="" class="" type="file" name="image">
                                  </a>
                            </span>
                        @endif
                        
                        <a data-type="{{$type}}" data-id="{{$uniqueId}}" href="" class="btn red-color-button btn-sm cancel-reply-form" style="margin-right:5px">{{trans('global.cancel')}}</a>
                       
                        <button class="btn black-color-button btn-sm" style="width:53px">{{trans('comment.comment-post')}}</button>
    
                    </div>
                @endif
            </div>
        </form>
    </div>
</div>

