<div id="users" class="page-layout carded fullwidth inner-scroll">
  <!-- TOP BACKGROUND -->
  <div class="top-bg accent"></div>
  <!-- / TOP BACKGROUND -->

  <!-- CENTER -->
  <div class="center">
    <!-- HEADER -->
    <div class="header accent" fxLayout="column" fxLayoutAlign="center center" fxLayout.gt-xs="row"
      fxLayoutAlign.gt-xs="space-between center">
      <!-- APP TITLE -->
      <div class="logo mb-24 mb-sm-0" fxLayout="row" fxLayoutAlign="start center">
        <mat-icon class="logo-icon s-32 mr-16" [@animate]="{ value: '*', params: { delay: '50ms', scale: '0.2' } }">
          shopping_basket
        </mat-icon>
        <span class="logo-text h1" [@animate]="{ value: '*', params: { delay: '100ms', x: '-25px' } }">Users</span>
      </div>
      <!-- / APP TITLE -->

      <!-- SEARCH -->
      <div class="search-wrapper  ml-sm-32">
        <div class="search" fxFlex fxLayout="row" fxLayoutAlign="start center">
          <mat-icon>search</mat-icon>
          <input #filter placeholder="Search for an order" />
        </div>
      </div>
      <!-- / SEARCH -->
    </div>
    <!-- / HEADER -->

    <!-- CONTENT CARD -->
    <div class="content-card">
      <mat-table class="users-table" #table matSort [@animateStagger]="{ value: '50' }" fusePerfectScrollbar>
        <!-- ID/Nickname Column -->
        <ng-container matColumnDef="id">
          <mat-header-cell *matHeaderCellDef mat-sort-header>아이디</mat-header-cell>
          <mat-cell *matCellDef="let order">
            <p class="text-truncate">{{ order.id }}</p>
          </mat-cell>
        </ng-container>

        <!-- Charge/Exchange Fees Column -->
        <ng-container matColumnDef="chargeFees">
          <mat-header-cell *matHeaderCellDef mat-sort-header fxHide fxShow.gt-sm>충/환 커미션</mat-header-cell>
          <mat-cell *matCellDef="let order" fxHide fxShow.gt-sm>
            <p class="text-truncate">{{ order.reference }}</p>
          </mat-cell>
        </ng-container>

        <!-- Sport Bet Fees Column -->
        <ng-container matColumnDef="sportBetFees">
          <mat-header-cell *matHeaderCellDef mat-sort-header>(스)배팅 커미션</mat-header-cell>
          <mat-cell *matCellDef="let order">
            <p class="text-truncate">
              {{ order.customer.firstName }}
              {{ order.customer.lastName }}
            </p>
          </mat-cell>
        </ng-container>

        <!-- Mini Game Bet Fees Column -->
        <ng-container matColumnDef="miniGameBetFees">
          <mat-header-cell *matHeaderCellDef mat-sort-header fxHide fxShow.gt-md>(미)배팅 커미션</mat-header-cell>
          <mat-cell *matCellDef="let order" fxHide fxShow.gt-md>
            <p class="total-price text-truncate">
              {{ order.total | currency: 'USD':'symbol' }}
            </p>
          </mat-cell>
        </ng-container>

        <!-- Rotus Bet Fees Column -->
        <ng-container matColumnDef="rotusBetFees">
          <mat-header-cell *matHeaderCellDef mat-sort-header fxHide fxShow.gt-sm>(로)배팅 커미션</mat-header-cell>
          <mat-cell *matCellDef="let order" fxHide fxShow.gt-sm>
            <p class="text-truncate">
              {{ order.payment.method }}
            </p>
          </mat-cell>
        </ng-container>

        <!-- Loser Sport Fees Column -->
        <ng-container matColumnDef="loserSportFees">
          <mat-header-cell *matHeaderCellDef mat-sort-header>낙첨금(스)커미션</mat-header-cell>
          <mat-cell *matCellDef="let order">
            <p class="status text-truncate h6 p-4" [ngClass]="order.status[0].color">
              {{ order.status[0].name }}
            </p>
          </mat-cell>
        </ng-container>

        <!-- Loser Mini Fees Column -->
        <ng-container matColumnDef="loserMiniFees">
          <mat-header-cell *matHeaderCellDef mat-sort-header>낙첨금(미)커미션</mat-header-cell>
          <mat-cell *matCellDef="let order">
            <p class="status text-truncate h6 p-4" [ngClass]="order.status[0].color">
              {{ order.status[0].name }}
            </p>
          </mat-cell>
        </ng-container>

        <!-- Calculate Method Column -->
        <ng-container matColumnDef="calculateMethod">
          <mat-header-cell *matHeaderCellDef mat-sort-header>정산방식&적용</mat-header-cell>
          <mat-cell *matCellDef="let order">
            <p class="status text-truncate h6 p-4" [ngClass]="order.status[0].color">
              {{ order.status[0].name }}
            </p>
          </mat-cell>
        </ng-container>

        <mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></mat-header-row>

        <mat-row *matRowDef="let order; columns: displayedColumns" class="order" matRipple
          [routerLink]="'/apps/e-commerce/users/' + order.id">
        </mat-row>
      </mat-table>

      <mat-paginator #paginator [pageIndex]="0" [pageSize]="10" [pageSizeOptions]="[5, 10, 25, 100]">
      </mat-paginator>
    </div>
    <!-- / CONTENT CARD -->
  </div>
  <!-- / CENTER -->
</div>