import * as i0 from '@angular/core';
import { Injectable, Inject, NgModule } from '@angular/core';
import { DOCUMENT } from '@angular/common';

class DocumentRef {
    constructor(doc) {
        this.doc = doc;
    }
    get document() {
        return this.doc;
    }
    get body() {
        return this.document.body;
    }
    get documentElement() {
        return this.document.documentElement;
    }
}
DocumentRef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DocumentRef, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
DocumentRef.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DocumentRef });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DocumentRef, decorators: [{
            type: Injectable
        }], ctorParameters: function () { return [{ type: undefined, decorators: [{
                    type: Inject,
                    args: [DOCUMENT]
                }] }]; } });

class WindowRef {
    constructor(documentRef) {
        this.documentRef = documentRef;
    }
    get window() {
        return this.document.defaultView;
    }
    get document() {
        return this.documentRef.document;
    }
    get pageXOffset() {
        return this.window.pageXOffset;
    }
    get pageYOffset() {
        return this.window.pageYOffset;
    }
    get innerHeight() {
        return this.window.innerHeight;
    }
    get innerWidth() {
        return this.window.innerWidth;
    }
    getComputedStyle(element) {
        return this.window.getComputedStyle(element);
    }
    getBoundingClientRect(elementRef) {
        return elementRef.nativeElement && elementRef.nativeElement.getBoundingClientRect();
    }
}
WindowRef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: WindowRef, deps: [{ token: DocumentRef }], target: i0.ɵɵFactoryTarget.Injectable });
WindowRef.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: WindowRef });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: WindowRef, decorators: [{
            type: Injectable
        }], ctorParameters: function () { return [{ type: DocumentRef }]; } });

class WindowRefModule {
}
WindowRefModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: WindowRefModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
WindowRefModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: WindowRefModule });
WindowRefModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: WindowRefModule, providers: [
        WindowRef,
        DocumentRef,
    ] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: WindowRefModule, decorators: [{
            type: NgModule,
            args: [{
                    providers: [
                        WindowRef,
                        DocumentRef,
                    ],
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { DocumentRef, WindowRef, WindowRefModule };
//# sourceMappingURL=ng-devui-window-ref.mjs.map
