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

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ButtonBar?>
<?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.RadioButton?>
<?import javafx.scene.control.ToggleGroup?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Circle?>
<?import org.cryptomator.ui.controls.FontAwesome5IconView?>

<?import javafx.scene.Group?>
<HBox xmlns:fx="http://javafx.com/fxml"
	  xmlns="http://javafx.com/javafx"
	  fx:id="hBox"
	  fx:controller="org.cryptomator.ui.recoverykey.RecoveryKeyOnboardingController"
	  prefWidth="480"
	  minHeight="242"
	  spacing="12"
	  VBox.vgrow="ALWAYS"
	  accessibleRole="DIALOG">
	<padding>
		<Insets topRightBottomLeft="12"/>
	</padding>
	<Group>
		<StackPane>
			<padding>
				<Insets topRightBottomLeft="6"/>
			</padding>
			<Circle styleClass="glyph-icon-primary" radius="24"/>
			<FontAwesome5IconView styleClass="glyph-icon-white" glyph="SYNC" glyphSize="24"/>
		</StackPane>
	</Group>
	<VBox HBox.hgrow="ALWAYS" spacing="12">
		<Label fx:id="titleLabel" text="%recover.recoverVaultConfig.title" styleClass="label-extra-large"/>
		<VBox spacing="6">
			<VBox fx:id="chooseMethodeBox" spacing="6">
				<Label text="%recover.onBoarding.chooseMethod"/>
				<RadioButton fx:id="recoveryKeyRadio" text="%recover.onBoarding.useRecoveryKey" selected="true">
					<toggleGroup>
						<ToggleGroup fx:id="methodToggleGroup"/>
					</toggleGroup>
				</RadioButton>
				<RadioButton fx:id="passwordRadio" text="%recover.onBoarding.usePassword"/>
			</VBox>

			<Label fx:id="messageLabel" wrapText="true"/>
			<Label fx:id="pleaseConfirm" wrapText="true"/>
			<GridPane alignment="CENTER_LEFT">
				<padding>
					<Insets left="6"/>
				</padding>
				<columnConstraints>
					<ColumnConstraints minWidth="20" halignment="LEFT"/>
					<ColumnConstraints />
				</columnConstraints>
				<rowConstraints>
					<RowConstraints valignment="TOP"/>
					<RowConstraints valignment="TOP"/>
					<RowConstraints valignment="TOP"/>
				</rowConstraints>
				<Label text="1." GridPane.rowIndex="0" GridPane.columnIndex="0"/>
				<Label text="%recover.onBoarding.intro.ensure" wrapText="true" GridPane.rowIndex="0" GridPane.columnIndex="1"/>
				<Label text="2." GridPane.rowIndex="1" GridPane.columnIndex="0"/>
				<Label fx:id="secondTextDesc" text="%recover.onBoarding.intro.recoveryKey" wrapText="true" GridPane.rowIndex="1" GridPane.columnIndex="1"/>
			</GridPane>
			<CheckBox fx:id="affirmationBox" text="%recover.onBoarding.affirmation"/>
		</VBox>

		<Region VBox.vgrow="ALWAYS"/>

		<ButtonBar buttonMinWidth="120" buttonOrder="+CX" VBox.vgrow="NEVER">
			<buttons>
				<Button text="%generic.button.cancel" ButtonBar.buttonData="CANCEL_CLOSE" cancelButton="true" onAction="#close"/>
				<Button fx:id="nextButton" text="%generic.button.next" ButtonBar.buttonData="NEXT_FORWARD"
						disable="${!affirmationBox.selected}" defaultButton="true" onAction="#next"/>
			</buttons>
		</ButtonBar>

	</VBox>
</HBox>
