package Controllers.Home;

import java.net.URL;
import java.util.ResourceBundle;
import javafx.animation.FadeTransition;
import javafx.collections.FXCollections;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.Node;
import javafx.scene.control.ChoiceBox;
import javafx.scene.layout.AnchorPane;
import javafx.util.Duration;

/**
 * FXML Controller class
 * @author Maher Ben Tili
 */
public class ContactController implements Initializable {

    @FXML private AnchorPane AnchorPaneContact ;
    
    @FXML public ChoiceBox ChoiceBoxMsgSujet;
    
    /**
     * Initializes the controller class.
     */
    @Override
    public void initialize(URL url, ResourceBundle rb) {
        
        ChoiceBoxMsgSujet.setItems(FXCollections.observableArrayList("Une question relative à un problème technique.",
                                                                    "Besoin d'une nouvelle fonctionnalité."));
        
        FadeTransitionNode(AnchorPaneContact);
        
    }    
    
    public void FadeTransitionNode(Node AnchorPane){
        FadeTransition ft = new FadeTransition(Duration.millis(200), AnchorPane);
        ft.setFromValue(0);
        ft.setToValue(1.0);
        ft.play();
    }    
    
}
