package dev.lions.unionflow.client.view;

import jakarta.enterprise.context.RequestScoped;
import jakarta.inject.Named;
import java.io.Serializable;

@Named("helloView")
@RequestScoped
public class HelloView implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    private String message = "Bienvenue sur UnionFlow avec Quarkus et PrimeFaces!";
    private String name;
    private String greeting;
    
    public void sayHello() {
        if (name != null && !name.isEmpty()) {
            greeting = "Bonjour " + name + " ! Bienvenue sur UnionFlow.";
        } else {
            greeting = "Veuillez entrer votre nom.";
        }
    }
    
    public String getMessage() {
        return message;
    }
    
    public void setMessage(String message) {
        this.message = message;
    }
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public String getGreeting() {
        return greeting;
    }
    
    public void setGreeting(String greeting) {
        this.greeting = greeting;
    }
}
