import { Inject, Injectable, NgZone } from '@angular/core';
import { BlockScrollStrategy, ScrollDispatcher, ScrollStrategyOptions } from '@angular/cdk/overlay';
import { RViewportRulerAdapter } from './viewport-ruler-adapter';
import { DOCUMENT } from '@angular/common';
import { RLayoutScrollService } from '../../services/scroll.service';
export class RBlockScrollStrategyAdapter extends BlockScrollStrategy {
    constructor(document, viewportRuler, scrollService) {
        super(viewportRuler, document);
        this.scrollService = scrollService;
    }
    enable() {
        super.enable();
        this.scrollService.scrollable(false);
    }
    disable() {
        super.disable();
        this.scrollService.scrollable(true);
    }
}
RBlockScrollStrategyAdapter.decorators = [
    { type: Injectable }
];
RBlockScrollStrategyAdapter.ctorParameters = () => [
    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
    { type: RViewportRulerAdapter },
    { type: RLayoutScrollService }
];
export class RScrollStrategyOptions extends ScrollStrategyOptions {
    constructor(scrollService, scrollDispatcher, viewportRuler, ngZone, document) {
        super(scrollDispatcher, viewportRuler, ngZone, document);
        this.scrollService = scrollService;
        this.scrollDispatcher = scrollDispatcher;
        this.viewportRuler = viewportRuler;
        this.ngZone = ngZone;
        this.document = document;
        this.block = () => new RBlockScrollStrategyAdapter(this.document, this.viewportRuler, this.scrollService);
    }
}
RScrollStrategyOptions.decorators = [
    { type: Injectable }
];
RScrollStrategyOptions.ctorParameters = () => [
    { type: RLayoutScrollService },
    { type: ScrollDispatcher },
    { type: RViewportRulerAdapter },
    { type: NgZone },
    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
];
//# sourceMappingURL=block-scroll-strategy-adapter.js.map