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

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ButtonBar?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Region?>
<?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:controller="org.cryptomator.ui.recoverykey.RecoveryKeyRecoverController"
	  minWidth="400"
	  maxWidth="400"
	  minHeight="145"
	  spacing="12"
	  accessibleRole="DIALOG">
	<padding>
		<Insets topRightBottomLeft="12"/>
	</padding>
	<children>
		<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 spacing="12" HBox.hgrow="ALWAYS" alignment="TOP_CENTER">
			<fx:include fx:id="recoveryKeyValidate" source="recoverykey_validate.fxml"/>

			<Region VBox.vgrow="ALWAYS"/>

			<ButtonBar buttonMinWidth="120" buttonOrder="+BX">
				<buttons>
					<Button fx:id="cancelButton" ButtonBar.buttonData="BACK_PREVIOUS" cancelButton="true" onAction="#closeOrReturn"/>
					<Button text="%generic.button.next" ButtonBar.buttonData="NEXT_FORWARD" defaultButton="true" onAction="#recover" disable="${!controller.validateController.recoveryKeyCorrect}"/>
				</buttons>
			</ButtonBar>
		</VBox>
	</children>
</HBox>
