import {Injectable} from '@angular/core';
import {BehaviorSubject, Subscription} from 'rxjs';

@Injectable()
export class AppService {

    private themeSource:BehaviorSubject<string> = new BehaviorSubject('white');
    public theme = this.themeSource.asObservable();

    private contentHeightSource:BehaviorSubject<string> = new BehaviorSubject('');
    public contentHeight = this.contentHeightSource.asObservable();

    private CollapseSource:BehaviorSubject<boolean> = new BehaviorSubject(false);
    public Collapse = this.CollapseSource.asObservable();

    public setTheme(value: string){
        this.themeSource.next(value);
    }

    public setContentHeight(value: string){
        this.contentHeightSource.next(value);
    }

    public setCollapse(value: boolean){
        this.CollapseSource.next(value);
    }
}
