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

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.ChoiceBox?>
<?import javafx.scene.control.Hyperlink?>
<?import javafx.scene.control.ToggleGroup?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.layout.Region?>
<VBox xmlns:fx="http://javafx.com/fxml"
	  xmlns="http://javafx.com/javafx"
	  fx:controller="org.cryptomator.ui.preferences.GeneralPreferencesController"
	  spacing="12">
	<fx:define>
		<ToggleGroup fx:id="nodeOrientation"/>
	</fx:define>
	<padding>
		<Insets topRightBottomLeft="24"/>
	</padding>
	<children>
		<CheckBox fx:id="autoStartCheckbox" text="%preferences.general.autoStart" visible="${controller.autoStartSupported}" managed="${controller.autoStartSupported}" onAction="#toggleAutoStart"/>

		<CheckBox fx:id="startHiddenCheckbox" text="%preferences.general.startHidden" />

		<CheckBox fx:id="autoCloseVaultsCheckbox" text="%preferences.general.autoCloseVaults" />

		<HBox spacing="12" alignment="CENTER_LEFT">
			<CheckBox fx:id="useKeychainCheckbox" text="%preferences.general.keychainBackend"/>
			<ChoiceBox fx:id="keychainBackendChoiceBox" accessibleText="%preferences.general.keychainBackend"/>
		</HBox>

		<HBox spacing="12" alignment="CENTER_LEFT" visible="${controller.someQuickAccessServiceAvailable}" managed="${controller.someQuickAccessServiceAvailable}">
			<CheckBox fx:id="useQuickAccessCheckbox" text="%preferences.general.quickAccessService"/>
			<ChoiceBox fx:id="quickAccessServiceChoiceBox" accessibleText="%preferences.general.quickAccessService"/>
		</HBox>
		<Region VBox.vgrow="ALWAYS"/>

		<HBox spacing="12" alignment="CENTER_LEFT">
			<CheckBox fx:id="debugModeCheckbox" text="%preferences.general.debugLogging"/>
			<Hyperlink styleClass="hyperlink-underline" text="%preferences.general.debugDirectory" onAction="#showLogfileDirectory"/>
		</HBox>
	</children>
</VBox>
