@model StratisAddressPayload
@{
    ViewBag.Title = "Stratis Address Generator";
    ViewBag.Description = "Generate a Stratis address with a public address to receive your coins and a private key that spends your coins.";
    Layout = "_Layout";
}
<div class="shadow-inset"></div>
<section class="welcome-area pb-4" id="welcome-1">
    <div class="header-token pt-5">
        <div class="container">
            <div class="row">
                <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12 pt-5 align-self-center text-center">
                    <h2>Stratis Public Key</h2>
                    <img src="@Url.Action("Qr", new {value = Model.PublicKey})" class="qr"/>
                    <div class="input-group mb-3 mt-2 input-group-lg pl-lg-5 pr-lg-5">
                        <div class="input-group-prepend">
                            <span class="input-group-text bg-dark text-white">PUB</span>
                        </div>
                        <input type="text" class="form-control bg-dark" value="@Model.PublicKey">
                        <div class="input-group-append">
                            <button class="btn btn-success click-copy" type="button"><i class="fa fa-copy"></i> Copy</button>
                        </div>
                    </div>
                    <p class="m-0 change-success">This is your address to receive coins, it's public.</p>
                </div>
                <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12 pt-5 align-self-center text-center">
                    <h2>Stratis Private Address</h2>
                    <img src="@Url.Action("Qr", new {value = Model.PrivateKey})" class="qr"/>
                    <div class="input-group mb-3 mt-2 input-group-lg pl-lg-5 pr-lg-5">
                        <div class="input-group-prepend">
                            <span class="input-group-text bg-dark text-white">WIF</span>
                        </div>
                        <input type="text" class="form-control bg-dark" value="@Model.PrivateKey">
                        <div class="input-group-append">
                            <button class="btn btn-success click-copy" type="button"><i class="fa fa-copy"></i> Copy</button>
                        </div>
                    </div>
                    <p class="m-0 change-danger">This is your private key that spends your coins, keep it secure.</p>
                </div>
            </div>
            <div class="row mt-5">
                <div class="col-md-12 text-center">
                    <a asp-controller="Home" asp-action="Generator" asp-route-timestamp="@DateTime.Now.Ticks" class="btn-secondary-box"><i class="fa fa-refresh"></i> Generate New Address</a>
                    @*<p class="small extra mt-5">Disclaimer: We does not store the generated addresses but by security please don't for big amounts.</p>*@
                </div>
            </div>
        </div>
    </div>
</section>
@section Scripts
{
    <script type="text/javascript">
        $(document).ready(function() {
            $(".click-copy").click(function() {
                $(this).parent().parent().find("input").select();
                document.execCommand("copy");
            });
        });
    </script>
}
