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

@Injectable()
export class AppService {

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

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

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

    public setContentHeight(value: string){
        console.log(`appser:${value}`);
        this.contentHeightSource.next(value);
    }
}
