<div
  class="sm:absolute sm:inset-0 flex flex-col flex-auto min-w-0 sm:overflow-hidden bg-card dark:bg-transparent"
>
  <!-- Header -->
  <div
    class="relative flex flex-col sm:flex-row flex-0 sm:items-center sm:justify-between py-8 px-6 md:px-8 border-b"
  >
    <!-- Loader -->
    <div class="absolute inset-x-0 bottom-0" *ngIf="isLoading">
      <mat-progress-bar [mode]="'indeterminate'"></mat-progress-bar>
    </div>
    <!-- Title -->
    <div class="text-4xl font-extrabold tracking-tight">웹 입출금 정산</div>
    <!-- Actions -->
    <div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4">
      <!-- Search -->
      <button mat-icon-button (click)="__onClickSearch()">
        <mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon>
      </button>
    </div>
  </div>
  <!-- Search -->
  <div
    *ngIf="__isSearchOpened"
    class="relative flex flex-col sm:flex-row flex-0 sm:items-center sm:justify-between py-4 px-6 md:px-8 border-b"
  >
    <!-- Actions -->
    <div fxLayout="row wrap" class="items-center mt-6 sm:mt-0 sm:ml-0">
      <!-- SelectBox -->
      <mat-form-field fxFlex class="bet-mat-form-field-wrapper-mb-0 mr-2">
        <mat-select placeholder="검색어">
          <mat-option value="">아이디</mat-option>
          <mat-option value="">닉네임</mat-option>
        </mat-select>
      </mat-form-field>
      <!-- Search -->
      <mat-form-field
        fxFlex
        class="fuse-mat-rounded min-w-64 bet-mat-form-field-wrapper-mb-0 mr-2"
      >
        <mat-icon
          class="icon-size-5"
          matPrefix
          [svgIcon]="'heroicons_solid:search'"
        ></mat-icon>
        <input
          matInput
          [formControl]="searchInputControl"
          [autocomplete]="'off'"
          [placeholder]="'Search user'"
        />
      </mat-form-field>
      <!-- Add user button -->
      <button
        fxFlex
        mat-flat-button
        style="position: fixed; margin-top: 4px"
        [color]="'primary'"
        (click)="__createProduct()"
      >
        <mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon>
        <span class="ml-2 mr-1">Search</span>
      </button>
    </div>
  </div>

  <!-- Main -->
  <div>웹입금</div>
  <div class="flex flex-auto overflow-hidden">
    <!-- Products list -->
    <div
      class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
    >
      <ng-container *ngIf="webCalculates$ | async as webCalculates">
        <ng-container *ngIf="webCalculates.length > 0; else noWebCalculate">
          <div class="grid">
            <!-- Header -->
            <div
              class="web-calculate-grid z-10 sticky top-0 grid gap-4 py-4 px-6 md:px-8 shadow text-md font-semibold text-secondary bg-gray-50 dark:bg-black dark:bg-opacity-5"
            >
              <div>번호</div>
              <div>
                아이디
                <hr style="margin: 7px 0px" />
                닉네임
              </div>
              <div>등급</div>
              <div class="hidden sm:block">입금자이름</div>
              <div class="hidden md:block">결제금액</div>
              <div class="hidden md:block">
                신청일
                <hr style="margin: 7px 0px" />
                확인일
              </div>
            </div>
            <!-- Rows -->
            <ng-container *ngIf="webCalculates$ | async as webCalculates">
              <ng-container
                *ngFor="let webCalculate of webCalculates; trackBy: __trackByFn"
              >
                <div
                  class="web-calculate-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
                >
                  <div>
                    {{ webCalculate.webDepositIdx }}
                  </div>
                  <div>
                    {{ webCalculate.webDepositId }}
                    <hr style="margin: 7px 0px" />
                    {{ webCalculate.webDepositNickname }}
                  </div>
                  <div>{{ webCalculate.webDepositRank }}</div>
                  <div class="hidden sm:block">
                    {{ webCalculate.nameOfDepositer }}
                  </div>
                  <div class="hidden md:block">
                    {{ webCalculate.webDepositAmountOfPayment }}원
                  </div>
                  <div class="hidden md:block">
                    {{ webCalculate.webDepositregistrationDate }}
                    <hr style="margin: 7px 0px" />
                    {{ webCalculate.webDepositConfirmDate }}
                  </div>
                </div>
              </ng-container>
              <div>합계&nbsp;&nbsp;&nbsp;71,300,000원</div>
            </ng-container>
          </div>
        </ng-container>
      </ng-container>

      <ng-template #noWebCalculate>
        <div
          class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
        >
          There are no Data!
        </div>
      </ng-template>
    </div>
  </div>
  <!-- Main -->
  <div>웹출금</div>
  <div class="flex flex-auto overflow-hidden">
    <!-- Products list -->
    <div
      class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
    >
      <ng-container *ngIf="webCalculates$ | async as webCalculates">
        <ng-container *ngIf="webCalculates.length > 0; else noWebCalculate">
          <div class="grid">
            <!-- Header -->
            <div
              class="web-calculate-grid z-10 sticky top-0 grid gap-4 py-4 px-6 md:px-8 shadow text-md font-semibold text-secondary bg-gray-50 dark:bg-black dark:bg-opacity-5"
            >
              <div>번호</div>
              <div>
                아이디
                <hr style="margin: 7px 0px" />
                닉네임
              </div>
              <div>등급</div>
              <div class="hidden sm:block">예금주</div>
              <div class="hidden md:block">결제금액</div>
              <div class="hidden md:block">
                신청일
                <hr style="margin: 7px 0px" />
                확인일
              </div>
            </div>
            <!-- Rows -->
            <ng-container *ngIf="webCalculates$ | async as webCalculates">
              <ng-container
                *ngFor="let webCalculate of webCalculates; trackBy: __trackByFn"
              >
                <div
                  class="web-calculate-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
                >
                  <div>
                    {{ webCalculate.webWithdrawIdx }}
                  </div>
                  <div>
                    {{ webCalculate.webWithdrawId }}
                    <hr style="margin: 7px 0px" />
                    {{ webCalculate.webWithdrawNickname }}
                  </div>
                  <div>{{ webCalculate.webWithdrawRank }}</div>
                  <div class="hidden sm:block">
                    {{ webCalculate.bankName }}
                    <hr style="margin: 7px 0px" />
                    {{ webCalculate.accountHolder }}
                    <hr style="margin: 7px 0px" />
                    {{ webCalculate.accountNumber }}
                  </div>
                  <div class="hidden md:block">
                    {{ webCalculate.webWithdrawAmountOfPayment }}원
                  </div>
                  <div class="hidden md:block">
                    {{ webCalculate.webWithdrawregistrationDate }}
                    <hr style="margin: 7px 0px" />
                    {{ webCalculate.webWithdrawConfirmDate }}
                  </div>
                </div>
              </ng-container>
              <div>합계&nbsp;&nbsp;&nbsp;19,010,000원</div>
            </ng-container>
          </div>

          <mat-paginator
            class="sm:absolute sm:inset-x-0 sm:bottom-0 border-b sm:border-t sm:border-b-0 z-10 bg-gray-50 dark:bg-transparent"
            [ngClass]="{ 'pointer-events-none': isLoading }"
            [length]="pagination?.length"
            [pageIndex]="pagination?.page"
            [pageSize]="pagination?.size"
            [pageSizeOptions]="[5, 10, 25, 100]"
            [showFirstLastButtons]="true"
          ></mat-paginator>
        </ng-container>
      </ng-container>

      <ng-template #noWebCalculate>
        <div
          class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
        >
          There are no Data!
        </div>
      </ng-template>
    </div>
  </div>
</div>
