/**
 *
 * carbon-angular v0.0.0 | utils.module.js
 *
 * Copyright 2014, 2020 IBM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0

 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


import { NgModule, Optional, SkipSelf, NgZone } from "@angular/core";
import { AnimationFrameService, AnimationFrameServiceSingleton } from "./animation-frame.service";
import { ElementService } from "./element.service";
// either provides a new instance of AnimationFrameServiceSingleton, or returns the parent
export function ANIMATION_FRAME_SERVICE_SINGLETON_PROVIDER_FACTORY(parentService, ngZone) {
    return parentService || new AnimationFrameServiceSingleton(ngZone);
}
export var ANIMATION_FRAME_SERVICE_SINGLETON_PROVIDER = {
    provide: AnimationFrameServiceSingleton,
    deps: [[new Optional(), new SkipSelf(), AnimationFrameServiceSingleton], NgZone],
    useFactory: ANIMATION_FRAME_SERVICE_SINGLETON_PROVIDER_FACTORY
};
var UtilsModule = /** @class */ (function () {
    function UtilsModule() {
    }
    UtilsModule.decorators = [
        { type: NgModule, args: [{
                    providers: [
                        ANIMATION_FRAME_SERVICE_SINGLETON_PROVIDER,
                        AnimationFrameServiceSingleton,
                        AnimationFrameService,
                        ElementService
                    ]
                },] },
    ];
    return UtilsModule;
}());
export { UtilsModule, AnimationFrameService, AnimationFrameServiceSingleton, ElementService };
//# sourceMappingURL=utils.module.js.map