<div ng-include src="'partials/account-nav.html'"></div>

<!--
<div ng-include src="'modals/openalias-confirm.html'" ng-show="openaliasDialog"></div>
-->
<div ng-include src="'modals/transfer-confirm.html'" ng-show="transferConfirmDialog"></div>

<div class="body-section">
    <div class="w-container">
        <div>
            <div class="w-row">
                <div class="w-col w-col-6">
                    <div ng-show="!success_page">
                        <div class="header-div-block">
                            <h1 class="heading-contained">Send Funds</h1>
                            <div class="subhead-text inner">Send funds to any Monero user anywhere in the world</div>
                        </div>
                    </div>
                    <div ng-show="success_page">
                        <!--<div class="image-div-block"><img src="images/check-icon.png" width="50" alt="545a29577cb2a4e7284f6abe_check-icon.png">
                        </div>-->
                        <div class="header-div-block">
                            <h1 class="heading-contained">Transaction Successful</h1>
                            <div class="subhead-text inner">Your transaction has been sent!</div>
                        </div>
                    </div>
                </div>
                <div class="w-col w-col-6">
                    <ng-include src="'partials/account-balance.html'"></ng-include>
                </div>
            </div>
        </div>
    </div>
    <div class="w-container middle-container send" ng-show="!view_only">
        <div class="middle-div send" ng-show="!success_page">
            <div class="w-form send-form">
                <form name="email-form" data-name="Email Form" data-redirect="/transaction-successful.html"
                      ng-submit="sendCoins(targets, mixins, payment_id)">
                    <label class="send-label" for="receiver-address">Receiver Address</label>
                    <input class="w-input" id="receiver-address" type="text" placeholder="e.g. donate@getmonero.org / donate.getmonero.org / a full Monero address"
                           name="Receiver-address" data-name="Receiver address" required="required" ng-model="targets[0].address">
                    <div class="w-row">
                        <div class="w-col w-col-6 responsive-column">
                            <label class="send-label" for="amount">Amount</label>
                            <input class="w-input" id="amount" type="text" placeholder="e.g. 0.5"
                                   name="Amount" data-name="Amount" required="required" ng-model="targets[0].amount">
                        </div>
                        <div class="w-col w-col-6 responsive-column">
                            <label class="send-label" for="payment-id">Payment ID (Optional)</label>
                            <input class="w-input" id="payment-id" type="text"
                                   placeholder="e.g. 59af9132941ec6e9f6ba3c4867e1cd92f2bd5fbce4325fc7b19bcdb55d640de5" name="Receiver-address-2"
                                   data-name="Receiver Address 2" ng-model="payment_id">
                        </div>
                    </div>
                    <label class="send-label" for="field4">Privacy Level</label>
                    <select class="w-input" id="field4" name="Select-a-number" data-name="Select a number"
                            required="required" ng-model="mixins">
                        <option value="6">Default (ring size 7)</option>
                        <option value="10">Higher (ring size 11)</option>
                        <option value="20">Even higher (ring size 21)</option>
                        <option value="40">Paranoid (ring size 41)</option>
                    </select>
                    <label class="send-label" for="field5">Priority Level (adjusts miner fee)</label>
                    <select class="w-input" id="field5" name="Select-a-number" data-name="Select a number"
                            required="required" ng-model="priority">
                        <option value="1">Low (the cheapest, but might not confirm quickly)</option>
                        <option value="2">Medium (default, usually enough for all transactions)</option>
                        <option value="3">High (if you are in hurry and if there is some backlog of txs)</option>
                        <option value="4">Paranoid (absolute priority, but the most expensive obviously)</option>
                    </select>
                    <input class="w-button send-btn" id="form-submit" type="submit" value="Send Payment"
                           data-wait="Please wait..." ng-disabled="submitting">
                </form>
                <div class="w-form-done" style="display: block;" ng-show="!!status">
                    <p>{{status}}</p>
                </div>
                <div class="w-form-fail error-backing" style="display: block;" ng-show="!!error">
                    <p>{{error}}</p>
                </div>
            </div>
        </div>
        <div class="middle-div send" ng-show="success_page">
            <div class="w-form send-form">
                <form name="email-form" data-name="Email Form" data-redirect="/send.html" ng-submit="resetSuccessPage()">
                    <label class="send-label" for="Receiver-address">Receiver Address</label>
                    <div class="move-text-div">
                        <div class="middle-text receive">{{sent_tx.address}} <span ng-show="sent_tx.domain">({{sent_tx.domain}})</span></div>
                    </div>
                    <div class="w-row">
                        <div class="w-col w-col-4 responsive-column">
                            <label class="send-label" for="Amount">Amount</label>
                            <div class="middle-text receive">{{sent_tx.amount | money}} (+{{sent_tx.tx_fee | money}} fee)</div>
                        </div>
                        <div class="w-col w-col-8 responsive-column">
                            <label class="send-label" >Payment ID</label>
                            <div class="middle-text receive">{{sent_tx.payment_id || "N/A"}}</div>
                        </div>
                    </div>
                    <label class="send-label" >Transaction ID/Hash</label>
                    <div class="move-text-div">
                        <div class="middle-text receive">{{sent_tx.tx_id}}</div>
                    </div>
                    <label class="send-label" >Transaction Private Key</label>
                    <div class="move-text-div">
                        <div class="middle-text receive">{{sent_tx.tx_prvkey}}</div>
                    </div>
                    <label class="send-label" >Soon should be visible in a blockchain explorer</label>
                    <div class="move-text-div">
                        <a class="login-link" href="{{ sent_tx.explorerLink }} " target="_blank">{{ sent_tx.explorerLink }}</a>
                    </div>
                    <input class="w-button send-btn" type="submit" value="Send Another Payment" data-wait="Please wait...">
                </form>
            </div>
        </div>
    </div>
    <div class="w-container middle-container send" ng-show="view_only">
        <div class="w-col w-col-11">
            <div class="middle-text ">View only wallets can't sent any transactions, as spendkey is unknown</div>
        </div>
    </div>
</div>
