/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module Views
 */
/** @public */
export var TiledGraphicsProvider;
(function (TiledGraphicsProvider) {
    /** @internal because TypeDoc can't disambiguate with the interface method by same name. */
    function addToScene(provider, context) {
        if (provider.addToScene)
            provider.addToScene(context);
        else
            provider.forEachTileTreeRef(context.viewport, (ref) => ref.addToScene(context));
    }
    TiledGraphicsProvider.addToScene = addToScene;
    /** @internal because TypeDoc can't disambiguate with the interface method by same name. */
    function isLoadingComplete(provider, viewport) {
        if (provider.isLoadingComplete && !provider.isLoadingComplete(viewport))
            return false;
        let allLoaded = true;
        provider.forEachTileTreeRef(viewport, (ref) => {
            allLoaded &&= ref.isLoadingComplete;
        });
        return allLoaded;
    }
    TiledGraphicsProvider.isLoadingComplete = isLoadingComplete;
})(TiledGraphicsProvider || (TiledGraphicsProvider = {}));
//# sourceMappingURL=TiledGraphicsProvider.js.map