<!--  Ticket Information -->
<div class="card">
  <div class="card-header  border-0">
    <div class="card-title">{{'Ticket Information' | translate}}</div>
    <input type="hidden" name="" id="ticket">
    @if (setting?.CUSTOMER_TICKET == 'no') {
      <div class="float-end ms-auto"><a routerLink="/customer/create-tickets"
        class="btn btn-white btn-sm ms-auto"><i class="fa fa-paper-plane-o me-2 fs-14"></i>{{'Create Ticket'
      | translate}}</a></div>
    }
  </div>
  <div class="card-body pt-2 px-0 pb-0">
    <div class="table-responsive tr-lastchild">
      <table class="table mb-0 table-information">
        <tbody>
          <tr>
            <td>
              <span class="w-50">{{'Ticket ID' | translate}}</span>
            </td>
            <td>:</td>
            <td>
              <span class="font-weight-semibold">#{{ticket?.ticket_id }}</span>
            </td>
          </tr>
          @if(ticket?.ccemails?.[0]?.ccemails){
            <tr>
              <td>
                <span className="w-50">{{'CC Mail' | translate}}</span>
              </td>
              <td>:</td>
              <td>
                <span className="font-weight-semibold">{{ticket?.ccemails?.[0]?.ccemails}}</span>
              </td>
            </tr>
          }
          <tr>
            <td>
              <span class="w-50">{{'Category' | translate}}</span>
            </td>
            <td>:</td>
            <td>
              @if (ticket?.category_id != null && ticket?.category != null) {
                <span class="font-weight-semibold">{{ticket.category?.name }}</span>
              } @else {
                ~
              }
            </td>
          </tr>
          @if (ticket?.subcategory != null) {
            <tr>
              <td>
                <span class="w-50">{{'SubCategory' | translate}}</span>
              </td>
              <td>:</td>
              <td>
                <span class="font-weight-semibold">{{ticket?.subcategoriess?.subcategoryname}}</span>
              </td>
            </tr>
          }

          @if (ticket?.item_name != null) {
            <tr>
              <td>
                <span class="w-50">{{'Item name' | translate}}</span>
              </td>
              <td>:</td>
              <td>
                <span class="font-weight-semibold">{{ ticket.item_name }}</span>
              </td>
            </tr>
          }
          @if (ticket?.project) {
            <tr>
              <td>
                <span class="w-50">{{'Project' | translate}}</span>
              </td>
              <td>:</td>
              <td>
                <span class="font-weight-semibold">{{ ticket.project}}</span>
              </td>
            </tr>
          }

          <tr>
            <td>
              <span class="w-50">{{'Opened Date' | translate}}</span>
            </td>
            <td>:</td>
            <td>
              <span class="font-weight-semibold">{{ ticket?.created_at | date: setting?.date_format}}</span>
            </td>
          </tr>
          <tr>
            <td>
              <span class="w-50">{{'Status' | translate}}</span>
            </td>
            <td>:</td>
            <td>

              @if (ticket?.status == 'New') {
                <span class="badge badge-burnt-orange">{{ticket?.status | translate }}</span>
              } @else {
                @if (ticket?.status == 'Re-Open') {
                  <span class="badge badge-teal">{{ticket?.status | translate }}</span>
                } @else {
                  @if (ticket?.status == 'Inprogress') {
                    <span class="badge badge-info">{{ticket?.status | translate }}</span>
                  } @else {
                    @if (ticket?.status == 'On-Hold') {
                      <span class="badge badge-warning">{{ticket?.status |translate }}</span>
                    } @else {
                      <span class="badge badge-danger">{{ticket?.status | translate }}</span>
                    }
                  }
                }
              }
            </td>
          </tr>
          @if (ticket?.replystatus == 'Solved' || ticket?.replystatus == 'Unanswered' || ticket?.replystatus == 'Waiting for response') {
            <tr>
              <td>
                <span class="w-50">{{'Reply Status' | translate}}</span>
              </td>
              <td>:</td>
              <td>
                @if (ticket?.replystatus == 'Solved') {
                  <span class="badge badge-success">{{ticket?.replystatus  | translate}}</span>
                } @else {
                  @if (ticket?.replystatus == 'Unanswered') {
                    <span class="badge badge-danger-light">{{ticket?.replystatus  | translate}}</span>
                  } @else {
                    @if (ticket?.replystatus == 'Waiting for response') {
                      <span class="badge badge-warning">{{ticket?.replystatus  | translate}}</span>
                    }
                  }
                }
              </td>
            </tr>
          }
          @if (ticket?.ticket_customfield?.length) {
            @for (customfield of ticket.ticket_customfield; track customfield) {
              @if (customfield.fieldtypes != 'textarea' && customfield.values?.length) {
                <tr>
                  <td>{{customfield.fieldnames}}</td>
                  <td>: </td>
                  <td>
                    @if (customfield.privacymode == '1') {
                      {{customfield.value }}
                    } @else {
                      {{customfield.values}}
                    }
                  </td>
                </tr>
              }
            }
          }
        </tbody>
      </table>
    </div>
  </div>
</div>
<!-- End Ticket Information -->

