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

<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import org.controlsfx.control.StatusBar?>
<?import javafx.scene.text.Text?>
<?import javafx.scene.shape.Rectangle?>
<?import com.sparrowwallet.sparrow.control.UnlabeledToggleSwitch?>
<?import com.sparrowwallet.drongo.BitcoinUnit?>

<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="200" minWidth="350" prefHeight="750.0" prefWidth="1000.0" fx:controller="com.sparrowwallet.sparrow.AppController" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1">
    <children>
        <MenuBar useSystemMenuBar="true">
            <menus>
                <Menu fx:id="fileMenu" mnemonicParsing="false" text="File">
                    <items>
                        <MenuItem mnemonicParsing="false" text="New Wallet" onAction="#newWallet"/>
                        <MenuItem mnemonicParsing="false" text="Open Wallet..." onAction="#openWallet"/>
                        <Menu mnemonicParsing="false" text="Open Transaction">
                            <items>
                                <MenuItem text="File..." onAction="#openTransactionFromFile"/>
                                <MenuItem fx:id="openTransactionIdItem" text="From ID..." onAction="#openTransactionFromId"/>
                                <MenuItem text="From Text..." onAction="#openTransactionFromText"/>
                                <MenuItem text="Examples" onAction="#openExamples"/>
                            </items>
                        </Menu>
                        <SeparatorMenuItem />
                        <MenuItem mnemonicParsing="false" text="Import Wallet..." onAction="#importWallet"/>
                        <MenuItem fx:id="exportWallet" mnemonicParsing="false" text="Export Wallet..." onAction="#exportWallet"/>
                        <SeparatorMenuItem styleClass="macHide" />
                        <MenuItem styleClass="macHide" mnemonicParsing="false" text="Preferences..." onAction="#openPreferences"/>
                        <SeparatorMenuItem />
                        <MenuItem mnemonicParsing="false" text="Close Tab" onAction="#closeTab"/>
                        <SeparatorMenuItem styleClass="macHide" />
                        <MenuItem styleClass="macHide" mnemonicParsing="false" text="Quit" onAction="#quit"/>
                    </items>
                </Menu>
                <fx:define>
                    <ToggleGroup fx:id="bitcoinUnit"/>
                </fx:define>
                <Menu mnemonicParsing="false" text="View">
                    <items>
                        <Menu mnemonicParsing="false" text="Bitcoin Unit">
                            <items>
                                <RadioMenuItem mnemonicParsing="false" text="Auto" toggleGroup="$bitcoinUnit" onAction="#setBitcoinUnit">
                                    <userData>
                                        <BitcoinUnit fx:constant="AUTO" />
                                    </userData>
                                </RadioMenuItem>
                                <RadioMenuItem mnemonicParsing="false" text="BTC" toggleGroup="$bitcoinUnit" onAction="#setBitcoinUnit">
                                    <userData>
                                        <BitcoinUnit fx:constant="BTC" />
                                    </userData>
                                </RadioMenuItem>
                                <RadioMenuItem mnemonicParsing="false" text="sats" toggleGroup="$bitcoinUnit" onAction="#setBitcoinUnit">
                                    <userData>
                                        <BitcoinUnit fx:constant="SATOSHIS" />
                                    </userData>
                                </RadioMenuItem>
                            </items>
                        </Menu>
                        <CheckMenuItem fx:id="showTxHex" mnemonicParsing="false" text="Show Transaction Hex" onAction="#showTxHex"/>
                    </items>
                </Menu>
                <Menu mnemonicParsing="false" text="Help">
                </Menu>
            </menus>
        </MenuBar>
        <StackPane fx:id="rootStack" VBox.vgrow="ALWAYS">
            <Rectangle styleClass="background-box" width="400" height="125" />
            <Text styleClass="background-text" text="Drag files here to open" />
            <TabPane fx:id="tabs" />
        </StackPane>

        <StatusBar fx:id="statusBar" text="" minHeight="36">
            <rightItems>
                <UnlabeledToggleSwitch fx:id="serverToggle" />
            </rightItems>
        </StatusBar>
    </children>
</VBox>
