import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import * as utils from '@nativescript/core/utils/utils';

/**
 * Service Action Bar Scroll Sync Service
 */
interface ScrollState {
    value: number;
}
@Injectable()
export class ActionBarScrollSyncService {
    constructor() { }

    currentScrollState = new BehaviorSubject<ScrollState>({ value: 0 });

    changeScroll(value: number): void {
        this.currentScrollState.next({ value });
    }

    /** Resets the count to the initial value */
    resetCount(): void {
        this.currentScrollState.next({ value: 0 })
    }

}