package be.iminds.jfed.gts_highlevel.controller;

import be.iminds.ilabt.jfed.util.JavaFXLogger;
import be.iminds.jfed.gts_highlevel.GtsServiceFactory;

import javax.inject.Inject;
import javax.inject.Singleton;

/**
 * User: twalcari
 * Date: 10/9/2015
 * Time: 09:40
 */
@Singleton
public class LoginControllerFactory {
    private final GtsConnectionProvider gtsConnectionProvider;
    private final GtsServiceFactory gtsServiceFactory;

    @Inject
    public LoginControllerFactory(@GtsLoginConnectionProvider GtsConnectionProvider gtsConnectionProvider,
                           GtsServiceFactory gtsServiceFactory) {
        this.gtsServiceFactory = gtsServiceFactory;
        this.gtsConnectionProvider = gtsConnectionProvider;
    }

    public LoginController createLoginController(JavaFXLogger logger){
        return new LoginController(gtsServiceFactory.createGtsService(logger), gtsConnectionProvider);
    }




}
