export default class Tab {
    private _id : number;
    private _isActivated : boolean;
    private _isConnected : boolean;

    constructor(id : number) {
        if (id === null || id === undefined || isNaN(id)) {
            throw new Error('cannot create ManagedTab without id')
        }
        this._id = id;
        this._isActivated = false;
        this._isConnected = false;
    }

    get id() : number {
        return this._id;
    }

    get isConnected() : boolean {
        return this._isConnected;
    }

    get isActivated() : boolean {
        return this._isActivated;
    }

    activate() {
        this._isActivated = true;
    }

    deActivate() {
        this._isActivated = false;
    }

    connect() {
        this._isConnected = true;
    }

    disconnect() {
        this._isConnected = false;
    }


}