<div class="uk-grid-margin uk-grid uk-grid-stack" uk-grid="">
  <div class="uk-width-1-1@m uk-first-column">

    <h1 class="uk-h2">Run compatibility test</h1>

    <!-- TOP HELP CONTENT -->
    <help-content #topHelperContent [position]="'top'"
                  [ngClass]="topHelperContent.isPresent()?'uk-margin-medium-top uk-margin-medium-bottom':'clear-style'">
    </help-content>

    <div class="uk-container uk-container-large uk-margin-medium-top uk-margin-medium-bottom">
      <div class="uk-grid">

        <!-- LEFT HELP CONTENT -->
        <aside-help-content #leftHelperContent [position]="'left'"
                            [ngClass]="leftHelperContent.isPresent()?'tm-sidebar uk-width-1-4@m uk-first-column':'clear-style'">
        </aside-help-content>

        <!-- MIDDLE -->
        <div class=" uk-width-expand@m">

          <div class="wizard">
            <div class="wizardBreadcrumbs">
              <div class="steps clearfix">
                <div class="step active">
                  <div>
                    Select datasource
                    <span></span>
                  </div>
                </div>
                <div class="step {{ (currentStep > 0) ? 'active' : '' }}">
                  <div>
                    Select guidelines
                    <span></span>
                  </div>
                </div>
                <div class="step {{ (currentStep > 1) ? 'active' : '' }}">
                  <div>
                    Select parameters
                    <span></span>
                  </div>
                </div>
                <div class="step {{ (currentStep > 2) ? 'active' : '' }}">
                  <div>
                    Finish
                    <span></span>
                  </div>
                </div>
              </div>
            </div>
            <div class="content">
              <div>
                <div class="animated fadeInRight stepContent">
                  <div *ngIf="errorMessage" class="uk-alert uk-alert-danger">{{ errorMessage }}</div>
                  <div *ngIf="loadingMessage" class="loading-big">
                    <div class="loader-big" style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;">
                      {{ loadingMessage }}
                    </div>
                    <div class="whiteFilm"></div>
                  </div>
                  <div *ngIf="(currentStep === 0) && !loadingMessage">
                    <compatibility-validate-step1 #step1ChooseBaseUrl
                                                  [baseUrlList]="baseUrlList"
                                                  (emitObject)="getChosenUrl($event)"></compatibility-validate-step1>
                  </div>
                  <div *ngIf="(currentStep === 1) && !loadingMessage">
                    <compatibility-validate-step2 #step2ChooseGuidelines
                                                  [ruleSets]="ruleSets"
                                                  (emitObject)="getChosenRules($event)">
                    </compatibility-validate-step2>
                  </div>
                  <div *ngIf="(currentStep === 2) && (type !== 'cris') && !loadingMessage">
                    <compatibility-validate-step3 #step3ChooseParameters
                                                  [valSets]="valSets"
                                                  (emitObject)="getChosenParameters($event)">
                    </compatibility-validate-step3>
                  </div>
                  <div *ngIf="(currentStep === 2) && (type === 'cris') && !loadingMessage">
                    <compatibility-validate-step3-cris #step3ChooseCrisEntities
                                                       (emitObject)="getChosenCrisEntities($event)">
                    </compatibility-validate-step3-cris>
                  </div>
                  <div *ngIf="(currentStep === 3) && !loadingMessage">
                    <div>
                      <div class="success">
                        <i class="fa fa-check-circle" style=""></i>
                        <h3>Validation has begun</h3>
                      </div>
                      <div class="uk-alert uk-alert-primary marginTop20 textAlignCenter">
                        You will be notified by email with the results of the compatibility test.
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div *ngIf="!loadingMessage" class="wizardActions">
              <button *ngIf="((currentStep === 1) || (currentStep === 2)) && !loadingMessage"
                      class="uk-button uk-button-grey-light uk-margin-small-right" type="button"
                      (click)="moveBackAStep()">
                <i class="fa fa-angle-double-left"></i>
                Back
              </button>
              <button *ngIf="(currentStep < 3) && !loadingMessage"
                      class="uk-button uk-button-grey-light uk-margin-small-left" type="button"
                      (click)="moveAStep()">

                <span class="{{(currentStep === 2) ? 'uk-link' : ''}}">
                  {{ (currentStep < 2) ? 'Next' : 'Finish' }}
                </span>
                <i class="fa fa-angle-double-right"></i>

              </button>
            </div>
          </div>

        </div>

        <!-- RIGHT HELP CONTENT -->
        <aside-help-content #rightHelperContent [position]="'right'"
                            [ngClass]="rightHelperContent.isPresent()?'tm-sidebar uk-width-1-4@m uk-first-column':'clear-style'">
        </aside-help-content>

      </div>
    </div>


    <!-- BOTTOM HELP CONTENT -->
    <help-content #bottomHelperContent [position]="'bottom'"
                  [ngClass]="bottomHelperContent.isPresent()?'uk-margin-medium-top uk-margin-medium-bottom':'clear-style'">
    </help-content>


  </div>
</div>
