<div class="custom_loader_wrapper" *ngIf="loader">
    <div class="custom_loader_ring"></div>
</div>
<header class="provider_header">
    <div class="row">
      <div class="col-md-6">
        <h4> {{'currencylist.Manage Currency' | translate}}</h4>
      </div>
      <div class="col-md-6 textRight relative">
          <button class="logout" (click)="goToPage('maker/home')">
            <img src="assets/images/asset_home.png">
           {{'currencylist.Home' | translate}}</button>
          <button class="logout" (click)="logout()">
              <img src="assets/images/asset_logout.png">
             {{'currencylist.Logout' | translate}}</button>
          <img src="assets/images/asset_logo1.png">
          <span (click)="goToPage('maker/changepin')"> {{'currencylist.Change PIN' | translate}}</span>
      </div>
    </div>
  </header>
<section>
    <div class="provider_content">
      <h3> {{'currencylist.Currency List' | translate}}</h3>
      <div class="provider_inner_content">
          <div class="table-responsive">   
              <div class="alert alert-danger alert-dismissible" *ngIf="error">
                  <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                  <strong> {{'currencylist.Warning!' | translate}}</strong> {{responseMsg}}
              </div>
              <div class="alert alert-success alert-dismissible" *ngIf="success">
                  <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                  <strong> {{'currencylist.Success!' | translate}}</strong> {{'currencylist.Currency removed successfully' | translate}}
                </div>      
              <table class="table">
                <thead>
                  <tr>
                    <th> {{'currencylist.Name' | translate}}</th>
                    <th> {{'currencylist.Symbol' | translate}}</th>
                    <th> {{'currencylist.Rate' | translate}}</th>
                    <th> {{'currencylist.Forex Multiple' | translate}}</th>
                    <th>{{'currencylist.Flag' | translate}}</th>
                    <th class="textRight">
                      <button class="add" (click)="goToPage('maker/currency_add')">+</button>
                    </th>
                  </tr>
                </thead>
                <tbody *ngIf="currencyList; else noCurrency">
                  <tr *ngFor="let currency of currencyList;">
                    <td>{{currency.name}}</td>
                    <td>{{currency.symbol}}</td>
                    <td>{{currency.rate}}</td>
                    <td>{{currency.start_from}}</td>
                    <td>
                      <img [src]="getImage(currency.flag)" onerror="this.src= 'assets/images/asset_denied.png'">
                    </td>
                    <td class="textRight">
                      <button class="edit_btn"(click)="editClick(currency.id)"></button>
                      <button class="delete_btn" (click)="deleteClick(currency.id)"></button>
                    </td>
                  </tr>
                </tbody>                
              </table>
              <ng-template #noCurrency></ng-template>
          </div>
      </div>
    </div>
  </section>