<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>

<?import org.controlsfx.control.StatusBar?>
<?import com.sparrowwallet.sparrow.control.UnlabeledToggleSwitch?>
<?import org.controlsfx.glyphfont.Glyph?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.image.Image?>
<StackPane prefHeight="460.0" prefWidth="600.0" stylesheets="@welcome.css, @general.css" styleClass="welcome-pane" fx:controller="com.sparrowwallet.sparrow.WelcomeController" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml">
    <VBox spacing="20">
        <HBox styleClass="title-area">
            <HBox alignment="CENTER_LEFT">
                <Label fx:id="title" text="Welcome to Sparrow" styleClass="title-label" />
            </HBox>
            <Region HBox.hgrow="ALWAYS"/>
            <ImageView AnchorPane.rightAnchor="0">
                <Image url="/image/sparrow-small.png" requestedWidth="50" requestedHeight="50" smooth="false" />
            </ImageView>
        </HBox>
        <VBox fx:id="welcomeBox" styleClass="content-area" spacing="20" prefHeight="370">
            <VBox fx:id="step1" spacing="15">
                <Label text="Introduction" styleClass="title-text">
                    <graphic>
                        <Glyph fontFamily="Font Awesome 5 Free Solid" fontSize="20" icon="TOGGLE_OFF" styleClass="title-icon" />
                    </graphic>
                </Label>
                <Label text="Sparrow is a Bitcoin wallet with a focus on security and usability." wrapText="true" styleClass="content-text" />
                <Label text="Sparrow can operate in both an online and offline mode. In the online mode it connects to a server to display transaction history. In the offline mode it is useful as a transaction editor and as an airgapped multisig coordinator." wrapText="true" styleClass="content-text" />
                <Label text="The status bar at the bottom displays the connection status, as demonstrated below:" wrapText="true" styleClass="content-text" />
            </VBox>
            <VBox fx:id="step2" spacing="15">
                <Label text="Connecting to a Public Server" styleClass="title-text">
                    <graphic>
                        <Glyph fontFamily="Font Awesome 5 Free Solid" fontSize="20" icon="TOGGLE_ON" styleClass="title-icon" />
                    </graphic>
                </Label>
                <Label text="If you are beginning your journey in self custody, or just storing a small amount, the easiest way to connect Sparrow to the Bitcoin blockchain is via one of the preconfigured public Electrum servers. " wrapText="true" styleClass="content-text" />
                <Label text="However, although Sparrow only connects to servers that have a record of respecting privacy, it is still not ideal as you are sharing your transaction history and balance with them." wrapText="true" styleClass="content-text" />
                <Label text="A yellow toggle means you are connected to a public server." wrapText="true" styleClass="content-text" />
            </VBox>
            <VBox fx:id="step3" spacing="15">
                <Label text="Connecting to a Bitcoin Core node" styleClass="title-text">
                    <graphic>
                        <Glyph fontFamily="Font Awesome 5 Free Solid" fontSize="20" icon="TOGGLE_ON" styleClass="title-icon" />
                    </graphic>
                </Label>
                <Label text="If you are running your own Bitcoin Core node, you can configure Sparrow to connect to it directly. " wrapText="true" styleClass="content-text" />
                <Label text="This means you are not sharing your transaction data, but be aware Bitcoin Core stores your balance, transactions and public keys unencrypted on that node, which is not ideal for true cold storage." wrapText="true" styleClass="content-text" />
                <Label text="A green toggle means you are connected to a Bitcoin Core node." wrapText="true" styleClass="content-text" />
            </VBox>
            <VBox fx:id="step4" spacing="15">
                <Label text="Connecting to a Private Electrum Server" styleClass="title-text">
                    <graphic>
                        <Glyph fontFamily="Font Awesome 5 Free Solid" fontSize="20" icon="TOGGLE_ON" styleClass="title-icon" />
                    </graphic>
                </Label>
                <Label text="The most private way to connect is to your own Electrum server, which in turn connects to your Bitcoin Core node." wrapText="true" styleClass="content-text" />
                <Label text="Because these servers index all Bitcoin transactions equally, your wallet transactions are never stored on the server in an identifiable way, and your server forgets your requests immediately after serving them." wrapText="true" styleClass="content-text" />
                <Label text="A blue toggle means you are connected to a private Electrum server. You're now ready to configure a server and start using Sparrow!" wrapText="true" styleClass="content-text" />
            </VBox>
            <Region VBox.vgrow="ALWAYS" />
            <StatusBar fx:id="serverStatus">
                <rightItems>
                    <UnlabeledToggleSwitch fx:id="serverToggle" />
                </rightItems>
            </StatusBar>
        </VBox>
    </VBox>
</StackPane>
