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

<?import com.jfoenix.controls.*?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.*?>
<?import org.jackhuang.hmcl.ui.animation.TransitionPane?>
<?import org.jackhuang.hmcl.ui.construct.ComponentList?>
<?import org.jackhuang.hmcl.ui.construct.HintPane?>
<?import javafx.geometry.Insets?>
<fx:root xmlns="http://javafx.com/javafx"
         xmlns:fx="http://javafx.com/fxml"
         type="BorderPane"
         prefHeight="400.0" prefWidth="600.0">
    <top>
        <HintPane onMouseClicked="#onSponsor" text="%sponsor.bmclapi" styleClass="sponsor-pane">
            <BorderPane.margin>
                <Insets top="10" right="10" left="10" />
            </BorderPane.margin>
        </HintPane>
    </top>
    <center>
        <TransitionPane fx:id="root">
            <JFXSpinner fx:id="spinner" styleClass="first-spinner" />
            <StackPane fx:id="center" style="-fx-padding: 10;">
                <ComponentList fx:id="centrePane" styleClass="no-padding">
                    <HBox fx:id="checkPane" spacing="10">
                        <JFXCheckBox fx:id="chkRelease" text="%version.game.releases" selected="true">
                            <HBox.margin>
                                <Insets top="10" bottom="10" />
                            </HBox.margin>
                        </JFXCheckBox>
                        <JFXCheckBox fx:id="chkSnapshot" text="%version.game.snapshots">
                            <HBox.margin>
                                <Insets top="10" bottom="10" />
                            </HBox.margin>
                        </JFXCheckBox>
                        <JFXCheckBox fx:id="chkOld" text="%version.game.old">
                            <HBox.margin>
                                <Insets top="10" bottom="10" />
                            </HBox.margin>
                        </JFXCheckBox>

                        <HBox HBox.hgrow="ALWAYS" />

                        <JFXButton fx:id="btnRefresh" styleClass="jfx-tool-bar-button" onMouseClicked="#onRefresh" text="%button.refresh" />
                    </HBox>
                    <JFXListView fx:id="list" styleClass="jfx-list-view-float" VBox.vgrow="ALWAYS">
                    </JFXListView>
                </ComponentList>
            </StackPane>
            <StackPane fx:id="failedPane" styleClass="notice-pane">
                <Label onMouseClicked="#onRefresh" text="%download.failed.refresh" />
            </StackPane>
            <StackPane fx:id="emptyPane" styleClass="notice-pane">
                <Label onMouseClicked="#onBack" text="%download.failed.empty" />
            </StackPane>
        </TransitionPane>
    </center>
</fx:root>
