@using TIAMWebApp.Shared.Application.Models;
<div class="card text-center">
    <div style="max-height: 50vh; overflow-y:hidden;">
    @{
        var url = "_content/TIAMSharedUI/images/auction" + AuctionItemId.ToString() + ".jpg";
    }
    <img src=@url class="card-img-top" style="margin: 0 auto;" alt="...">

    </div>
    <div class="card-body mb-3">
        <h5 class="card-title"><h3>Item @AuctionItemId.ToString()</h3></h5>
        <p class="card-text">@IsLoading</p>
    </div>
    <ul class="list-group list-group-flush">
        @{
           if(auctionBidModel.Email != null)
           {
            <li class="list-group-item">@auctionBidModel.Email</li>
           }
           if(auctionBidModel.OwnerId != Guid.Empty)
           {
            <li class="list-group-item">@auctionBidModel.OwnerId</li>
           }
           if(auctionBidModel.PhoneNumber != null)
           {
            <li class="list-group-item">@auctionBidModel.PhoneNumber</li>
           }
        }                    
        <li class="list-group-item">Minimum: 25 000</li>
        <li class="list-group-item">20 000 Ft</li>
    </ul>
    <div class="card-body">
        <form class="p-3 mt-3">
            <div>
                @switch (currentStep)
                {
                    case 0:
                        <AuctionStep0 @bind-AuctionBidModel="auctionBidModel" TargetProductId=@TargetAuctionId onNext="NextStep" />
                        ;
                        break;
                    case 1:
                        <AuctionStep1 @bind-AuctionBidModel="auctionBidModel" onNext="NextStep" />
                        ;
                        break;
                    case 2:
                        <AuctionStep2 @bind-AuctionBidModel="auctionBidModel" onNext="NextStep" onPrev="PreviousStep" />
                        ;
                        break;
                    case 3:
                        <AuctionStep3 @bind-AuctionBidModel="auctionBidModel" onSubmit="SubmitBid" onPrev="PreviousStep" />
                        ;
                        break;
                }
            </div>


        </form>
    </div>
        <div class="card-footer">
            <p>Bid azonosító: @auctionBidModel.Id</p>
        <!--a href="#" class="card-link">Card link</a>
        <a-- href="#" class="card-link">Another link</a-->

        </div>
</div>


@code {
    
}
