@using Microsoft.AspNetCore.Mvc.Rendering
@model UpdateChangellySettingsViewModel
@{
    Layout = "../Shared/_NavLayout.cshtml";
    ViewData.SetActivePageAndTitle(StoreNavPages.Index, "Update Store Changelly Settings");
}

<partial name="_StatusMessage" />

<div class="row">
    <div class="col-md-10">
        <form method="post">
            <div class="alert alert-warning" role="alert">
                If you are enabling Changelly support, we advise that you configure the invoice expiration to a minimum of 30 minutes as it may take longer than the default 15 minutes to convert the funds.
            </div>
            <div class="form-group">
                <label asp-for="ApiUrl"></label>
                <input asp-for="ApiUrl" class="form-control"/>
                <span asp-validation-for="ApiUrl" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="ApiKey"></label>
                <input asp-for="ApiKey" class="form-control"/>
                <span asp-validation-for="ApiKey" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="ApiSecret"></label>
                <input asp-for="ApiSecret" class="form-control"/>
                <span asp-validation-for="ApiSecret" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="ChangellyMerchantId"></label>
                <input asp-for="ChangellyMerchantId" class="form-control"/>
                <span asp-validation-for="ChangellyMerchantId" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="AmountMarkupPercentage"></label>
                <input asp-for="AmountMarkupPercentage" class="form-control"/>
                <span asp-validation-for="AmountMarkupPercentage" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="ShowFiat"></label>
                <input asp-for="ShowFiat" class="form-check"/>
                <span asp-validation-for="ShowFiat" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Enabled"></label>
                <input asp-for="Enabled" type="checkbox" class="form-check"/>
            </div>
            <button name="command" type="submit" value="save" class="btn btn-primary">Submit</button>
            <button name="command" type="submit" value="test" class="btn btn-primary">Test Settings</button>
        </form>
    </div>
</div>

@section Scripts {
    @await Html.PartialAsync("_ValidationScriptsPartial")
}
