package ctbrec.ui.sites.stripchat;

import java.io.IOException;

import ctbrec.sites.ConfigUI;
import ctbrec.sites.stripchat.Stripchat;
import ctbrec.ui.sites.AbstractSiteUi;
import ctbrec.ui.tabs.TabProvider;

public class StripchatSiteUi extends AbstractSiteUi {

    private StripchatTabProvider tabProvider;
    private StripchatConfigUI configUi;
    private Stripchat stripchat;

    public StripchatSiteUi(Stripchat stripchat) {
        this.stripchat = stripchat;
        tabProvider = new StripchatTabProvider(stripchat);
        configUi = new StripchatConfigUI(stripchat);
    }

    @Override
    public TabProvider getTabProvider() {
        return tabProvider;
    }

    @Override
    public ConfigUI getConfigUI() {
        return configUi;
    }

    @Override
    public synchronized boolean login() throws IOException {
        boolean automaticLogin = stripchat.login();
        return automaticLogin;
    }
}
