package de.tvo.workplace.layout;

import java.io.Serializable;

import org.eclnt.jsfserver.util.HttpSessionAccess;

import jakarta.servlet.http.HttpServletRequest;

public class LayoutManager implements Serializable {
	
	private static final long serialVersionUID = 1722243909044740449L;

	public static final DefaultLayout getLayoutObject() {
		
		HttpServletRequest request = HttpSessionAccess.getCurrentRequest();
		String url = request.getHeader("eclnt-originalurl");
		
//		System.out.println("eclnt-originalurl: " + url);
		
//		if (url != null && url.contains("g-tms")) {
//			return new GtmsLayout();
//		} else if (url != null && (url.contains("ccp.") || url.contains("ccp-test."))) {
//			return new GtmsLayout();
//		} else if (url != null && url.contains("geis")) {
//			//Geis must be last one
//			return new GeisLayout();
//		} else if (url != null && (url.contains("okay") || url.contains("husqvarna"))) {
//			//Geis must be last one
//			return new DefaultLayout();
//		} else {
			return new DefaultLayout();
//		}
	}
	
}
