<div class="text-center" ng-show="loadingState.enabled">
  <br/>
  <br/>
  <br/>
  <br/>
  <div class="row" ng-show="selectedTemplate.firstStep">
    This might take around 2 minutes... Please DO NOT refresh the page or navigate away!!!
  </div>
  <rd-loading>
  </rd-loading>
</div>

<div ng-show="!loadingState.enabled">
  <div class="row" ng-show="!selectedTemplate.firstStep">
    <div class="col-md-2"></div>
    <div class="col-md-8">

      <rd-widget>
        <rd-widget-header icon="fa-link" title="Select From List">
        </rd-widget-header>
        <rd-widget-body>

          <div class="row">
            <div class="col-sm-1"></div>
            <div class="col-sm-10">
              Choose an app, a database or a bundle (app+database) from the list below. The rest is magic, well... Wizard!
            </div>
          </div>

          <br/>

          <div class="row">
            <div class="col-sm-11">
              <div class="pull-right col-sm-4">
                <label>One-Click Apps</label>
                <div class="form-group">

                  <input type="text" ng-model="selectedApp.id" uib-typeahead="opt for opt in oneClickAppList | filter:$viewValue"
                    class="form-control" typeahead-min-length="0" typeahead-show-hint="true" typeahead-select-on-blur="true"
                    typeahead-editable="false">

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

          <div class="row">
            <div class="col-sm-11">
              <div class="pull-right col-sm-4">
                <button type="submit" ng-disabled="!selectedApp.id" class="btn btn-primary btn-block" ng-click="onOneClickAppSelected()">Next</button>
              </div>
            </div>
          </div>

        </rd-widget-body>
      </rd-widget>
    </div>
  </div>

  <br/>
  <hr/>
  <br/>

  <div class="row" ng-show="selectedTemplate.firstStep">
    <div class="col-md-2"></div>
    <div class="col-md-8">

      <rd-widget>
        <rd-widget-header icon="fa-link" title="Setup your {{selectedApp.id}}">
        </rd-widget-header>
        <rd-widget-body>

          <div class="row" ng-show="selectedTemplate.currentStep.message">
            <div class="row alerts-container">
              <div class="col-sm-12">
                <uib-alert class="allow-linebreaks-spans" type="{{selectedTemplate.currentStep.message.type}}">{{selectedTemplate.currentStep.message.text}}</uib-alert>
              </div>
            </div>
          </div>
          <br/>
          <br/>

          <div ng-show="selectedTemplate.currentStep.next">

            <div ng-repeat="param in selectedTemplate.currentStep.next.data">
              <div class="row">
                <div class="col-sm-1"></div>
                <div class="col-sm-10">

                  <label> {{param.label}}</label>
                  <p ng-show="!!param.labelDesc">{{param.labelDesc}}</p>
                  <div class="row">
                    <div class="col-sm-6">
                      <input ng-show="param.type==='text'" class="form-control" ng-model="param.value">
                    </div>
                  </div>

                </div>
              </div>

              <br/>
              <br/>
            </div>

          </div>

          <br/>
          <br/>

          <div class="row">
            <div class="col-sm-11">
              <div class="pull-right col-sm-4">
                <button type="submit" class="btn btn-primary btn-block" ng-click="onOneClickAppNextStepClicked()">{{selectedTemplate.currentStep.next?'Next':'Finish'}}</button>
              </div>
            </div>
          </div>

        </rd-widget-body>
      </rd-widget>
    </div>
  </div>

</div>