package ctbrec.ui.sites.manyvids;

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

import ctbrec.sites.manyvids.MVLive;
import ctbrec.ui.tabs.TabProvider;
import ctbrec.ui.tabs.ThumbOverviewTab;
import javafx.scene.Scene;
import javafx.scene.control.Tab;

public class MVLiveTabProvider extends TabProvider {

    private MVLive mvlive;

    public MVLiveTabProvider(MVLive mvlive) {
        this.mvlive = mvlive;

    }

    @Override
    public List<Tab> getTabs(Scene scene) {
        List<Tab> tabs = new ArrayList<>();
        tabs.add(createTab("Online"));
        return tabs;
    }

    private Tab createTab(String title) {
        MVLiveUpdateService updateService = new MVLiveUpdateService(mvlive);
        ThumbOverviewTab tab = new ThumbOverviewTab(title, updateService, mvlive);
        tab.setRecorder(mvlive.getRecorder());
        tab.setImageAspectRatio(1);
        return tab;
    }

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

}
