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

<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXDialog?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.*?>
<?import org.kordamp.ikonli.javafx.FontIcon?>
<JFXDialog xmlns:fx="http://javafx.com/fxml"
           xmlns="http://javafx.com/javafx"
           fx:controller="fr.insa.clavardator.client.ui.dialogs.EditUsernameDialogController"
           stylesheets="@../styles.css" fx:id="dialog">
  <AnchorPane
      prefWidth="600"
      prefHeight="400" styleClass="container">
    <VBox AnchorPane.topAnchor="0" AnchorPane.rightAnchor="0" AnchorPane.leftAnchor="0" AnchorPane.bottomAnchor="0">
      <padding>
        <Insets left="20" right="20" bottom="20" top="20"/>
      </padding>
      <VBox VBox.vgrow="ALWAYS" spacing="10">
        <padding>
          <Insets bottom="10"/>
        </padding>
        <Label styleClass="dialog-title" fx:id="titleLabel">TITLE</Label>
        <VBox VBox.vgrow="ALWAYS" alignment="CENTER" spacing="30">
          <Label VBox.vgrow="ALWAYS" fx:id="descriptionLabel">DESCRIPTION</Label>
          <JFXTextField HBox.hgrow="ALWAYS" fx:id="textField" promptText="Nom d'utilisateur" labelFloat="true"/>
        </VBox>
      </VBox>
      <HBox spacing="50" alignment="CENTER">
        <JFXButton text="Annuler" styleClass="background-danger" fx:id="cancelButton" onAction="#onCancel">
          <graphic>
            <FontIcon iconLiteral="fas-times"/>
          </graphic>
        </JFXButton>
        <JFXButton text="Valider" styleClass="background-success" fx:id="confirmButton" onAction="#onConfirm">
          <graphic>
            <FontIcon iconLiteral="fas-check"/>
          </graphic>
        </JFXButton>
      </HBox>
    </VBox>
  </AnchorPane>
</JFXDialog>

