{% include 'header.twig' %}


	 <!-- Main variables *content* -->
			 <main  id="content" >
				 <div class="container-fluid">
    <div class="row">
        <div class="col-lg-8">
            <div class="card custom__card mb-3">
                <div class="card-body">
                    <div class="info_card_title_wrap mb-3">
                        <div class="info_icon">
                            <i class="far fa-info-circle"></i>
                        </div>
                        <div class="info_title">
                            {{ messageList['ticket']['subject'] }}
                        </div>
                    </div>
                        <hr>
                         <div id="ticketsMessages">
                                             
                                             	 {% if messageList %}
                {% for message in messageList %}
                {% if message["support"] == 1 %}                                                                        
                                                                                                                    <div class="row ticket-message-block ticket-message-right user_messages">
                                    <div class="col-md-1"></div>
                                    <div class="col-md-11">
                                    <div class="ticket-message">
                                      <div class="message">	{{ message["message"] }}
.</div></div>
                                    <div class="info text-right user_user">
                                        <div class="icons">
                                            <img src="https://res.cloudinary.com/dmentewxe/image/upload/v1708294237/Rental-Panel/smmpanelbdlab/smmgen-v2/lmg/w8bfuj83e09palqd_nfphwe.png" class="img-fluid" alt="">
                                        </div>
                                        <div>
                                            <strong>{{ user["username"] }}</strong>
                                            <small class="text-muted">{{ message["time"] }}</small>
                                        </div>
                                    </div>
                                    </div>
                                    
                                    
                                                {% elseif message["subject"] %}
                                                    {% else %}                                                                        <div class="col-md-1"></div>
                                </div>
                                                                                                                            <div class="row ticket-message-block ticket-message-left admin_messages">
                                    <div class="col-md-11">
                                    <div class="ticket-message">
                                      <div class="message">{{ message["message"] }}</div>
                                    </div>
                                    <div class="info admin_user">
                                        <div class="icon">
                                            <img src="https://res.cloudinary.com/dmentewxe/image/upload/v1708295808/Rental-Panel/smmpanelbdlab/smmgen-v2/lmg/alq23sbrb8g85hlj_ii9z1u.png" class="img-fluid" alt="">
                                        </div>
                                        <div>
                                            <strong>support</strong>
                                            <small class="text-muted">{{ message["time"] }}</small>
                                        </div>
                                    </div>
                                    </div>
                                    <div class="col-md-1"></div>
                                </div>
                                                                                                        </div>
                                     {% endif %}

                {% endfor %}
              {% endif %}
              							                                                  
  
                          <hr>
                          
                            {% if messageList['ticket']['canmessage'] == 2 %}	
                                                      <div class="row">
                                <div class="col-md-12">
                                    <form  method="post" action="tickets/{{ messageList['ticket']['ticket_id'] }}" id="ticketsend">
                                        
                                        {% if error %}
        <div class="alert alert-dismissible alert-danger">
          <button type="button" class="close" data-dismiss="alert">×</button>
          {{ errorText }}
        </div>
      {% endif %}
      {% if success %}
        <div class="alert alert-dismissible alert-success">
          <button type="button" class="close" data-dismiss="alert">×</button>
          {{ successText }}
        </div>
      {% endif %}
                                        
                                                                                <div class="form-group panel-border-top">
                                          <label for="message" class="control-label">Message</label>
                                        <textarea id="message" rows="5" class="form-control" name="message" style="height: 200px;">{{ data["message"] }}</textarea>
                                       
                    
                                       
                                        <button type="submit" class="btn btn-primary d-block w-100" id="sendTicket">Submit</button>
                                      </form>
                                </div>
                                <div class="col-md-4">
                    {% endif %}
                                </div>
                            </div>
                                 </div>
    </div>
  </section>


{% include 'footer.twig' %}
