package eu.dnetlib.client.resources;

import eu.dnetlib.client.shared.Filtering;
import eu.dnetlib.client.shared.StartUpComponents;

public class PrimaryTab extends Tab {

	public PrimaryTab(String type, String topTitle, String topId, String bottomTitle, String bottomId, StartUpComponents startUpComponents) {
		super(type, topTitle, topId, bottomTitle, bottomId, startUpComponents);

		if (type.toLowerCase().contains("user")) {
			// For users
			filter = new Filtering(resourceThumbMap, topId);
		} else if (type.toLowerCase().contains("theme")) {
			// For themes
			filter = new Filtering(topId, bottomId, resourceThumbMap, startUpComponents, false, true);
		} else {
			// for other components
			filter = new Filtering(topId, bottomId, resourceThumbMap, startUpComponents, true, true);
		}
		super.fillPanel();
		panel.addStyleName("firstTabContent");

	}

	public PrimaryTab(String type, String id) {
		super(type, id);
		panel.addStyleName("firstTabContent");
	}
}