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

<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import org.controlsfx.glyphfont.*?>
<VBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
      fx:controller="ru.trader.controllers.RouteSearchController">
    <TitledPane text="%router.pane.route" minHeight="80" collapsible="false">
    <HBox>
        <VBox spacing="4" HBox.hgrow="ALWAYS">
            <HBox spacing="10" alignment="CENTER">
                <HBox spacing="2" alignment="BASELINE_LEFT">
                    <Label text="%router.pane.route.from" />
                    <TextField fx:id="fromSystemText" />
                    <ComboBox fx:id="fromStation" minWidth="140"/>
                    <Button minWidth="30" onAction="#currentAsFrom"><graphic><Glyph text="FontAwesome|MAP_MARKER"/></graphic></Button>
                </HBox>
                <HBox spacing="2" alignment="BASELINE_LEFT">
                    <Label text="%router.pane.route.to" />
                    <TextField fx:id="toSystemText" />
                    <ComboBox fx:id="toStation" minWidth="140"/>
                    <Button minWidth="30" onAction="#loop"><graphic><Glyph text="FontAwesome|RETWEET"/></graphic></Button>
                </HBox>
            </HBox>
            <HBox spacing="10" alignment="CENTER">
                <Button prefWidth="80" text="%router.button.search" onAction="#search" />
                <Button prefWidth="80" text="%router.button.singledSearch" onAction="#searchSingled" />
                <Button prefWidth="80" text="%router.button.top" onAction="#searchTop" />
            </HBox>
        </VBox>
        <VBox spacing="4" maxWidth="200">
            <Label text="%router.search.type" />
            <fx:define><ToggleGroup fx:id="searchType" /></fx:define>
            <RadioButton fx:id="rbByTime" text="%router.search.byTime" toggleGroup="$searchType"/>
            <RadioButton text="%router.search.byProfit" selected="true" toggleGroup="$searchType"/>
            <CheckBox fx:id="cbFullScan" selected="true" text="%router.search.full"/>
        </VBox>
    </HBox>
    </TitledPane>
    <HBox>
        <TitledPane text="%router.pane.missions" collapsible="false">
            <HBox spacing="10" minHeight="210" maxHeight="210">
                <fx:include fx:id="missions" source="missions.fxml"/>
                <HBox spacing="4" maxHeight="200">
                    <VBox spacing="4" alignment="TOP_RIGHT">
                        <Button prefWidth="30" onAction="#addMission"><graphic><Glyph text="FontAwesome|PLUS"/></graphic></Button>
                        <Button prefWidth="30" onAction="#removeMission"><graphic><Glyph text="FontAwesome|MINUS"/></graphic></Button>
                        <Button prefWidth="30" onAction="#clearMissions"><graphic><Glyph text="FontAwesome|TRASH"/></graphic></Button>
                    </VBox>
                    <ListView fx:id="missionsList" />
                </HBox>
            </HBox>
        </TitledPane>
        <TitledPane text="%router.pane.includeStations" collapsible="false">
            <VBox minHeight="210" maxHeight="210" spacing="4">
                <TextField fx:id="includeStarportText" prefWidth="150"/>
                <HBox spacing="4" alignment="CENTER" VBox.vgrow="ALWAYS">
                    <ListView fx:id="includesStations" HBox.hgrow="ALWAYS"/>
                    <VBox spacing="4">
                        <Button prefWidth="30" onAction="#addStarport"><graphic><Glyph text="FontAwesome|PLUS"/></graphic></Button>
                        <Button prefWidth="30" onAction="#removeStarport"><graphic><Glyph text="FontAwesome|MINUS"/></graphic></Button>
                        <Button prefWidth="30" onAction="#clearStarports"><graphic><Glyph text="FontAwesome|TRASH"/></graphic></Button>
                    </VBox>
                </HBox>
            </VBox>
        </TitledPane>
    </HBox>

</VBox>
