<!--
   -- Git Wizard Steps
   -->
<div pf-wizard-step
        step-title="{{:: 'git-export-wizard.repoPropsStepTitle' | translate}}"
        step-id="git-export-repo-props"
        step-priority="1"
        wz-disabled="{{!vm.wizardActive}}"
        next-enabled="vm.validateRepoProps()"
        allow-click-nav="false"
        substeps="false"
        ok-to-nav-away="vm.validateRepoProps()">
    <h1 class="step-message" translate="git-export-wizard.repoPropsStepMsg" />

    <git-credentials-control repo="vm.repo"
                             show-security-attributes="false"
                             show-repo-props="true"
                             show-name="false"
                             show-file-path="true"
                             require-author-name="vm.requireAuthorName = true"
                             require-author-email="vm.requireAuthorEmail = true"
                             on-selection="vm.onRepoSelection(selected)">
    </git-credentials-control>
</div>

<div pf-wizard-step
     step-title="{{:: 'git-export-wizard.commitStepTitle' | translate}}"
     step-id="git-export-execute"
     step-priority="2"
     allow-click-nav="false"
     substeps="true"
     wz-disabled="{{!vm.wizardActive}}">

    <div pf-wizard-substep 
         step-title="{{:: 'shared.Export' | translate}}"
         next-enabled="vm.validateCredentials()"
         prev-enabled="true"
         allow-click-nav="false"
         step-id="data-service-export"
         step-priority="3"
         ok-to-nav-away="true">
        <h1 class="step-message" translate="git-export-wizard.commitStepMsg" />
        <git-credentials-control repo="vm.repo"
                                 show-repo-props="false"
                                 show-security-attributes="true"">
        </git-credentials-control>
    </div>
    
    <div
        pf-wizard-substep
        step-title="Progress"
        next-enabled="vm.exportSuccess()"
        prev-enabled="vm.exportFailure()"
        allow-click-nav="false"
        step-id="data-service-export-progress-final"
        step-priority="4">
        <div
            class="wizard-pf-process blank-slate-pf"
            ng-show="vm.inProgress">
            <div class="spinner spinner-lg blank-slate-pf-icon"></div>
            <h3 class="blank-slate-pf-main-action" translate="dsExportGitWizard.exportProgressMsg" />
            <p class="blank-slate-pf-secondary-action"
               translate="dsExportGitWizard.exportProgressDetailMsg"
               translate-values="{ dataServiceName: vm.dataServiceName() }">
            </p>
        </div>
        <div
            class="wizard-pf-complete blank-slate-pf"
            ng-show="vm.exportSuccess()">
            <div class="wizard-pf-success-icon">
                <span class="pficon pficon-ok"></span>
            </div>
            <h3 class="blank-slate-pf-main-action" translate="dsExportGitWizard.successfulExportMsg" />
            <p class="blank-slate-pf-secondary-action">
            {{ vm.responseMsg }}
            <br>
            <strong>{{:: 'shared.Repository' | translate}}:</strong>&nbsp;<a href={{vm.repoTargetUrl()}} target="_blank">{{vm.repoTargetUrl()}}</a>
            </p>
        </div>
        <div
            class="wizard-pf-complete blank-slate-pf"
            ng-show="vm.exportFailure()">
            <div class="wizard-pf-success-icon">
                <span class="pficon pficon-error-circle-o"></span>
            </div>
            <h3 class="blank-slate-pf-main-action" translate="dsExportGitWizard.failedExportMsg" />
            <p class="blank-slate-pf-secondary-action">{{ vm.responseMsg }}</p>
            <a ng-click="vm.toggleDetails()">{{vm.detailsToggleTitle}}</a>
            <div ng-init="vm.showDetails = false" ng-show="vm.showDetails">
                <p><div style="text-align:left" ng-bind-html="vm.error"></div></p>
            </div>
        </div>
    </div>
</div>
