<?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.Region?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>
<?import org.cryptomator.ui.controls.FontAwesome5IconView?>
<?import javafx.scene.shape.Circle?>
<?import javafx.scene.Group?>
<HBox xmlns:fx="http://javafx.com/fxml"
	  xmlns="http://javafx.com/javafx"
	  fx:controller="org.cryptomator.ui.recoverykey.RecoveryKeyResetPasswordController"
	  minWidth="400"
	  maxWidth="400"
	  minHeight="145"
	  spacing="12"
	  alignment="TOP_CENTER"
	  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="KEY" glyphSize="24"/>
			</StackPane>
		</Group>
		<VBox spacing="12" HBox.hgrow="ALWAYS" alignment="TOP_CENTER">
			<fx:include fx:id="newPassword" source="new_password.fxml"/>

			<Region VBox.vgrow="ALWAYS"/>

			<VBox alignment="BOTTOM_CENTER" VBox.vgrow="ALWAYS">
				<ButtonBar buttonMinWidth="120" buttonOrder="+CI">
					<buttons>
						<Button text="%generic.button.back" ButtonBar.buttonData="CANCEL_CLOSE" cancelButton="true" onAction="#close"/>
						<Button fx:id="nextButton" ButtonBar.buttonData="FINISH" defaultButton="true" disable="${!controller.passwordSufficientAndMatching}" onAction="#next"/>
					</buttons>
				</ButtonBar>
			</VBox>
		</VBox>
	</children>
</HBox>
