{% include 'header.twig' %}
<!-- Main variables *content* -->
         <div class="app-content">
            <!-- page-content -->
            <div class="container-fluid">
               <div class="row mt-4">
                  <div class="col-lg-12">
                     <section class="order-side">
                        <div class="row">
                           <div class="col-lg-12 col-12 mb-5 mb-lg-0">
                              <div class="d-card dc-dblue">
                                 <div class="d-card-body" id="dc-body">
                                            {% if error %}
                                                <div class="alert alert-dismissible alert-danger">
                                                  <button type="button" class="close" data-dismiss="alert">&times;</button>
                                                  {{ errorText }}
                                                </div>
                                              {% endif %}
                                              {% if success %}
                                                <div class="alert alert-dismissible alert-success">
                                                  <button type="button" class="close" data-dismiss="alert">&times;</button>
                                                  {{ successText }}
                                                </div>
                                              {% endif %}
                                              
                                            {% if messageList %}
                                                {% for message in messageList %}
                                                  {% if message["support"] == 1 %}
									<div class="row ticket-message-block ticket-message-right">
											 <div class="col-md-1"></div>
											 
												<div class="col-md-11" style="margin-bottom: 10px">
													<div class="ticket-message">
														<div class="message">{{ message["message"] }}</div>
													</div>
													<div class="info text-right mt-2">
														<strong>{{ user["username"] }}</strong>
														<small class="text-muted">{{ message["time"] }}</small>
													</div>
												</div>
											<div class="col-md-1"></div>
										</div>
										{% elseif message["subject"] %}
                                          {% else %}
										<div class="row ticket-message-block ticket-message-left">
											<div class="col-md-11" style="margin-bottom: 10px">
												<div class="ticket-message">
													<div class="message">
														{{ message["message"] }}
													</div>
												</div>
												<div class="info mt-2">
													<strong>Support team <img src="https://cdn.mypanel.link/oewf4r/i1a9z2k4lpybbg7x.png" width="20"></strong>
													<small class="text-muted">{{ message["time"] }}</small>
												</div>
											 </div>
											<div class="col-md-1"></div>
										</div>
										{% endif %}
                                        {% endfor %}
                                      {% endif %}
										{% if messageList['ticket']['canmessage'] == 2 %}									  																		
												<form  method="post" action="tickets/{{ messageList['ticket']['ticket_id'] }}">
									                                       <div class="form-group message mt-5">
                                          <label for="message" class="control-label">Your message</label>
                                          <textarea class="form-control" rows="7" id="message"  name="message" placeholder="Please enter your message ..." style="height:150px!important">{{ data["message"] }}</textarea>
                                       </div>
                                       <button type="submit" class="btn btn-primary btn-lg btn-block">Reply</button>
                                    </form>
                                    {% endif %}
									                                 </div>
                              </div>
                              <!-- d-card end -->
                           </div>

                        </div>
                     </section>
                  </div>
                  <!-- page-content end -->
               </div>
               <!-- app-content -->
            </div>
         </div>

</div>
{% include 'footer.twig' %}
