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

<?import org.cryptomator.ui.controls.FontAwesome5IconView?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Arc?>
<?import javafx.scene.control.ContextMenu?>
<?import javafx.scene.control.MenuItem?>
<StackPane xmlns:fx="http://javafx.com/fxml"
		   xmlns="http://javafx.com/javafx"
		   fx:id="root"
		   fx:controller="org.cryptomator.ui.mainwindow.VaultListController"
		   minWidth="206">
	<VBox>
		<StackPane VBox.vgrow="ALWAYS">
			<ListView fx:id="vaultList" editable="true" fixedCellSize="60">
				<contextMenu>
					<fx:include source="vault_list_contextmenu.fxml"/>
				</contextMenu>
			</ListView>
			<VBox visible="${controller.emptyVaultList}" spacing="6" alignment="CENTER">
				<Region VBox.vgrow="ALWAYS"/>
				<Label VBox.vgrow="NEVER" text="%main.vaultlist.emptyList.onboardingInstruction" textAlignment="CENTER" wrapText="true"/>
				<Arc VBox.vgrow="NEVER" styleClass="onboarding-overlay-arc" type="OPEN" centerX="50" centerY="0" radiusY="100" radiusX="50" startAngle="0" length="-60" strokeWidth="1"/>
			</VBox>
		</StackPane>
		<Button fx:id="addVaultBtn" onAction="#toggleMenu" styleClass="toolbar-button" text="%main.vaultlist.addVaultBtn" alignment="BASELINE_CENTER" maxWidth="Infinity" contentDisplay="RIGHT">
			<graphic>
				<FontAwesome5IconView glyph="CARET_DOWN"/>
			</graphic>
		</Button>
		<fx:define>
			<ContextMenu fx:id="addVaultContextMenu">
				<items>
					<MenuItem styleClass="add-vault-menu-item" text="%main.vaultlist.addVaultBtn.menuItemNew" onAction="#didClickAddNewVault" >
						<graphic>
							<FontAwesome5IconView glyph="PLUS" textAlignment="CENTER" wrappingWidth="14" />
						</graphic>
					</MenuItem>
					<MenuItem styleClass="add-vault-menu-item" text="%main.vaultlist.addVaultBtn.menuItemExisting" onAction="#didClickAddExistingVault" >
						<graphic>
							<FontAwesome5IconView glyph="FOLDER_OPEN" textAlignment="CENTER" wrappingWidth="14" />
						</graphic>
					</MenuItem>
				</items>
			</ContextMenu>
		</fx:define>
	</VBox>
	<Region styleClass="drag-n-drop-border" visible="${controller.draggingVaultOver}"/>
</StackPane>
