<?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.ButtonBar?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.Group?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Circle?>
<HBox xmlns:fx="http://javafx.com/fxml"
	  xmlns="http://javafx.com/javafx"
	  fx:controller="org.cryptomator.ui.dialogs.SimpleDialogController"
	  minWidth="400"
	  maxWidth="400"
	  minHeight="145"
	  spacing="12"
	  accessibleRole="DIALOG">
	<padding>
		<Insets topRightBottomLeft="12"/>
	</padding>
	<children>
		<Group>
			<StackPane>
				<padding>
					<Insets topRightBottomLeft="6"/>
				</padding>
				<Circle styleClass="glyph-icon-primary" radius="24"/>
				<FontAwesome5IconView glyph="${controller.icon}" styleClass="glyph-icon-white" glyphSize="24"/>
			</StackPane>
		</Group>
		<VBox HBox.hgrow="ALWAYS">
			<Label text="${controller.message}" styleClass="label-large" wrapText="true">
				<padding>
					<Insets bottom="6" top="6"/>
				</padding>
			</Label>
			<Label text="${controller.description}" wrapText="true"/>
			<Region VBox.vgrow="ALWAYS" minHeight="18"/>
			<ButtonBar buttonMinWidth="120" buttonOrder="+CI">
				<buttons>
					<Button text="${controller.cancelButtonText}" ButtonBar.buttonData="CANCEL_CLOSE" cancelButton="true" onAction="#handleCancel" visible="${controller.cancelButtonVisible}" managed="${controller.cancelButtonVisible}"/>
					<Button text="${controller.okButtonText}" ButtonBar.buttonData="FINISH" defaultButton="true" onAction="#handleOk"/>
				</buttons>
			</ButtonBar>
		</VBox>
	</children>
</HBox>