<div class="row justify-content-center">
    <div class="col-8">
        <div *ngIf="book">
            <h2><span>Book</span> {{book.id}}</h2>
            <hr>
            <jhi-alert-error></jhi-alert-error>
            <dl class="row-md jh-entity-details">
                <dt><span>Title</span></dt>
                <dd>
                    <span>{{book.title}}</span>
                </dd>
                <dt><span>Author</span></dt>
                <dd>
                    <span>{{book.author}}</span>
                </dd>
                <dt><span>Published</span></dt>
                <dd>
                    <span>{{book.published}}</span>
                </dd>
                <dt><span>Quantity</span></dt>
                <dd>
                    <span>{{book.quantity}}</span>
                </dd>
                <dt><span>Price</span></dt>
                <dd>
                    <span>{{book.price}}</span>
                </dd>
            </dl>

            <button type="submit"
                    (click)="previousState()"
                    class="btn btn-info">
                <fa-icon [icon]="'arrow-left'"></fa-icon>&nbsp;<span> Back</span>
            </button>

            <button type="button"
                    [routerLink]="['/book', book.id, 'edit']"
                    class="btn btn-primary">
                <fa-icon [icon]="'pencil-alt'"></fa-icon>&nbsp;<span> Edit</span>
            </button>

            <button type="button"
                    class="btn btn-primary"
                    (click)="purchase(book.id)">
                <span>Purchase</span>
            </button>
        </div>
    </div>
</div>
