<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

?>
<div class="nav-bar-outer-actions">
    <div class="outer-actions-inner-wrap">
        <div class="btn-wrap btn-wrap-triangle-right btn-wrap-next">
            <button
                type="button"
                class="btn btn-prime"
                disabled
                >Next</button>
        </div>
        <div class="btn-wrap btn-wrap-triangle-left btn-wrap-prev">
            <button
                type="button"
                class="btn"
                ng-disabled="isDisabled"
                ng-click="previousState()"
                >Back</button>
        </div>
        <div class="btn-wrap btn-wrap-try-again" ng-show="isStarted">
            <button
                type="button"
                class="btn btn-secondary"
                ng-disabled="isDisabled"
                ng-click="start()"
                >Try Again</button>
        </div>
    </div>
</div>

<h2 class="page-sub-title">{{$state.current.header}}</h2>

<div ng-show="!isStarted" class="accent-box">
    <p>You're ready!</p>
    <button ng-click="start()" class="btn btn-large btn-prime">Install Now</button>
</div>

<div ng-show="isStarted" class="content-install">
    <p class="text-right">Installing... {{progressText}}</p>
    <div class="progress">
        <div
            class="progress-bar"
            role="progressbar"
            aria-valuenow="{{progress}}"
            aria-valuemin="0"
            aria-valuemax="100"
            ng-style="barStyle(progress)"
            >
        </div>
    </div>
    <div ng-show="isFailed" class="message message-error">
        <span class="message-text">
            <strong>Installation is incomplete.</strong>
            <br>
            Check the console log for errors before trying again.
        </span>
    </div>
    <button
        type="button"
        class="btn btn-expand"
        ng-click="toggleConsole()"
        ng-class="{'expanded': isConsole}"
        >
        Console Log
    </button>
    <div ng-show="isConsole" id="console">
        <div class="console" ng-bind-html="log"></div>
    </div>
</div>

<div class="install-database-clean" ng-show="isShowCleanUpBox">
    <p>To install sample data you should clean up you database</p>
    <button
        type="button"
        class="btn btn-secondary"
        ng-disabled="isDisabled"
        ng-click="startCleanup(true)">
        Clean up automatically
    </button>
    <button
        type="button"
        class="btn btn-secondary"
        ng-disabled="isDisabled"
        ng-click="startCleanup(false)">
        Proceed without clean up
    </button>
    <button
        type="button"
        class="btn"
        ng-disabled="isDisabled"
        ng-click="hideCleanUpBox()">
        Cancel
    </button>
</div>
