package ctbrec.ui.sites.showup;

import java.util.ArrayList;
import java.util.List;

import ctbrec.sites.showup.Showup;
import ctbrec.ui.tabs.TabProvider;
import ctbrec.ui.tabs.ThumbOverviewTab;
import javafx.scene.Scene;
import javafx.scene.control.Tab;

public class ShowupTabProvider extends TabProvider {

    private Showup site;

    public ShowupTabProvider(Showup site) {
        this.site = site;
    }

    @Override
    public List<Tab> getTabs(Scene scene) {
        List<Tab> tabs = new ArrayList<>();
        tabs.add(createTab("Women", "female"));
        tabs.add(createTab("Men", "male"));
        tabs.add(createTab("All", "all"));
        //tabs.add(new ShowupFollowedTab("Favorites", site));
        return tabs;
    }

    @Override
    public Tab getFollowedTab() {
        return null;
    }

    private Tab createTab(String title, String category) {
        ShowupUpdateService updateService = new ShowupUpdateService(site, category);
        ThumbOverviewTab tab = new ThumbOverviewTab(title, updateService, site);
        tab.setRecorder(site.getRecorder());
        return tab;
    }
}
