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

<?import com.jfoenix.controls.*?>
<?import com.jfoenix.validation.RequiredFieldValidator?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import org.jackhuang.hmcl.ui.construct.ComponentList?>
<fx:root xmlns="http://javafx.com/javafx"
         xmlns:fx="http://javafx.com/fxml"
         type="StackPane">
    <fx:define>
        <Insets fx:id="insets" top="5" bottom="12"/>
        <Insets fx:id="componetListMargin" top="16" bottom="16" />
    </fx:define>
    <ScrollPane fx:id="scroll" fitToWidth="true" fitToHeight="true">
        <BorderPane style="-fx-padding: 16;">
            <top>
            <Label wrapText="true" textAlignment="JUSTIFY" text="%modpack.wizard.step.initialization.warning"/>
            </top>
            <center>
            <ComponentList BorderPane.margin="$componetListMargin">
                <BorderPane>
                    <left>
                        <Label text="%modpack.wizard.step.initialization.exported_version" />
                    </left>
                    <right>
                        <Label fx:id="lblVersionName"/>
                    </right>
                </BorderPane>
                <JFXTextField labelFloat="true" promptText="%modpack.name" fx:id="txtModpackName"
                              StackPane.margin="$insets">
                    <validators>
                        <RequiredFieldValidator message="%modpack.not_a_valid_name"/>
                    </validators>
                </JFXTextField>
                <JFXTextField labelFloat="true" promptText="%archive.author" fx:id="txtModpackAuthor"
                              StackPane.margin="$insets">
                    <validators>
                        <RequiredFieldValidator/>
                    </validators>
                </JFXTextField>
                <JFXTextField labelFloat="true" promptText="%archive.version" fx:id="txtModpackVersion" text="1.0"
                              StackPane.margin="$insets">
                    <validators>
                        <RequiredFieldValidator/>
                    </validators>
                </JFXTextField>
                <JFXTextArea labelFloat="true" promptText="%modpack.desc" fx:id="txtModpackDescription"
                             StackPane.margin="$insets" minHeight="400" />
                <BorderPane>
                    <left>
                        <Label text="%modpack.wizard.step.initialization.include_launcher"/>
                    </left>
                    <right>
                        <JFXToggleButton fx:id="chkIncludeLauncher" size="7" maxHeight="10.0" minHeight="10.0"/>
                    </right>
                </BorderPane>
            </ComponentList>
            </center>
            <bottom>
            <HBox alignment="CENTER_RIGHT">
                <JFXButton fx:id="btnNext" onMouseClicked="#onNext" prefWidth="100" prefHeight="40" buttonType="RAISED"
                           text="%wizard.next" styleClass="jfx-button-raised"/>
            </HBox>
            </bottom>
        </BorderPane>
    </ScrollPane>
</fx:root>
