<div class="dialog">
  <button class="dialog-close" mat-dialog-close></button>
  <h2>{{ 'ParticipateModal.Title' | translate }}</h2>
  <h3 *ngIf="data.existingUserBid.greaterThan(0)">{{ 'ParticipateModal.CurrentBet' | translate }} {{ data.existingUserBid | formatNumber : 3 : data.svtDecimals  }} {{ 'ParticipateModal.SVT' | translate }}</h3>
  <p class="strong">{{ 'ParticipateModal.HowMuchSVTBet' | translate }}</p>
  <input appOnlyNumbersByDecimal [decimal]="data.svtDecimals" [(ngModel)]="inputString"
         (keydown)='changeParticipate.next($event)'
         placeholder="{{ 'ParticipateModal.MAX' | translate }} {{ data.actualSVTbalance | formatNumber : 3 : data.svtDecimals }} {{ 'ParticipateModal.SVT' | translate }}"
         class="input" type="text">
  <p class="description error" *ngIf="isNewBidGreatherThanBalance">{{ 'ParticipateModal.NotEnoughBalance' | translate }}</p>
  <p class="description error" *ngIf="isUserWantCloseEmptyModal">{{ 'ParticipateModal.EnterParticipateValue' | translate }}</p>
  <p class="description" *ngIf="isDescriptionShow && newBid.greaterThan(0)">
    {{ 'ParticipateModal.YouReceive' | translate }}
    <strong>{{ computedShare | formatNumber : 0 : data.tokenDecimals }} {{ data.tokenTicker }}</strong>
    {{ 'ParticipateModal.AboutReceive' | translate }}
  </p>
  <p class="about-frozen" *ngIf="newBid && newBid.greaterThan(0)">
    {{ 'ParticipateModal.Your' | translate }} {{ newBid | formatNumber : 3 : data.svtDecimals }} {{
    'ParticipateModal.SVT' | translate }}
    {{ 'ParticipateModal.WillBeFreezed' | translate }} {{ frozenTime | date: 'HH:mm dd.MM.yyyy' }}
  </p>
  <p class="button-wrapper">
    <button (click)="submit(true)" *ngIf="data.existingUserBid.isZero()" class="material-btn">{{ 'ParticipateModal.Participate' | translate }}
    </button>
    <button (click)="submit(true)" *ngIf="data.existingUserBid.greaterThan(0)" class="material-btn material-btn__action">
      {{ 'ParticipateModal.AddSVT' | translate }}
    </button>
  </p>
</div>
