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

<?import org.cryptomator.ui.controls.FontAwesome5IconView?>
<?import org.cryptomator.ui.controls.FormattedLabel?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ButtonBar?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextArea?>
<?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.recoverykey.RecoveryKeyDisplayController"
	  minWidth="350"
	  minHeight="280"
	  spacing="12"
	  alignment="TOP_LEFT">
	<children>
		<FormattedLabel format="%recoveryKey.display.description" arg1="${controller.vaultName}" wrapText="true"/>

		<TextArea editable="false" text="${controller.recoveryKey}" wrapText="true" prefRowCount="4" fx:id="textarea"/>
		<ButtonBar buttonMinWidth="120" buttonOrder="+R">
			<buttons>
				<Button text="%generic.button.print" ButtonBar.buttonData="RIGHT" onAction="#printRecoveryKey" visible="${controller.printerSupported}">
					<graphic>
						<FontAwesome5IconView glyph="PRINT"/>
					</graphic>
				</Button>
				<Button fx:id="copyButton" text="%generic.button.copy" ButtonBar.buttonData="RIGHT" onAction="#copyRecoveryKey">
					<graphic>
						<FontAwesome5IconView glyph="COPY"/>
					</graphic>
				</Button>
			</buttons>
		</ButtonBar>

		<Region VBox.vgrow="ALWAYS"/>

		<Label text="%recoveryKey.display.StorageHints" wrapText="true"/>
	</children>
</VBox>
