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

<?import org.cryptomator.ui.controls.FontAwesome5IconView?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.VBox?>
<VBox xmlns:fx="http://javafx.com/fxml"
	  xmlns="http://javafx.com/javafx"
	  fx:controller="org.cryptomator.ui.vaultoptions.MasterkeyOptionsController"
	  spacing="6"
	  alignment="TOP_CENTER">
	<padding>
		<Insets topRightBottomLeft="12"/>
	</padding>
	<children>
		<VBox spacing="6" alignment="CENTER">
			<Button text="%vaultOptions.masterkey.changePasswordBtn" onAction="#changePassword" contentDisplay="LEFT" maxWidth="Infinity">
				<graphic>
					<FontAwesome5IconView glyph="KEY"/>
				</graphic>
			</Button>
			<Button text="%vaultOptions.masterkey.forgetSavedPasswordBtn" onAction="#removePasswordFromKeychain" contentDisplay="LEFT" maxWidth="Infinity" visible="${controller.passwordSaved}"
					managed="${controller.passwordSaved}">
				<graphic>
					<FontAwesome5IconView glyph="UNLINK"/>
				</graphic>
			</Button>
		</VBox>
		<Region VBox.vgrow="ALWAYS"/>
		<Label maxWidth="-Infinity" text="%vaultOptions.masterkey.recoveryKeyExplanation" wrapText="true"/>
		<VBox spacing="6" alignment="CENTER">
			<Button text="%vaultOptions.masterkey.showRecoveryKeyBtn" onAction="#showRecoveryKey" contentDisplay="LEFT" maxWidth="Infinity">
				<graphic>
					<FontAwesome5IconView glyph="EYE"/>
				</graphic>
			</Button>
			<Button text="%vaultOptions.masterkey.recoverPasswordBtn" onAction="#showRecoverVaultDialogue" contentDisplay="LEFT" maxWidth="Infinity">
				<graphic>
					<FontAwesome5IconView glyph="SYNC"/>
				</graphic>
			</Button>
		</VBox>
		<Region VBox.vgrow="ALWAYS"/>
	</children>
</VBox>
