/*!
 * Copyright (C) Microsoft Corporation. All rights reserved.
 */
import { Log } from '../telemetry/log';
import { PowerDataRuntime } from './powerDataRuntime';
/**
 * Singleton instance of PowerDataRuntime
 */
let powerDataRuntimeInstance;
/**
 * Gets or creates a singleton instance of PowerDataRuntime
 * @param powerDataSourcesInfoProvider - Data sources info provider to initialize the PowerDataRuntime
 * @param powerOperationExecutor - Optional power operation executor to initialize the PowerDataRuntime
 * @returns PowerDataRuntime instance
 * @private
 */
export function getPowerDataRuntime(powerDataSourcesInfoProvider, powerOperationExecutor) {
    if (!powerDataRuntimeInstance) {
        powerDataRuntimeInstance = new PowerDataRuntime({
            powerDataSourcesInfoProvider,
            powerOperationExecutor,
        });
    }
    return powerDataRuntimeInstance;
}
/**
 * Resets the PowerDataRuntime singleton instance.
 * Useful for testing or reinitialization.
 * @private
 */
export function resetPowerDataRuntimeInstance() {
    powerDataRuntimeInstance = undefined;
    // Reset the Log instance as well to ensure a clean state
    Log.resetInstance();
}
//# sourceMappingURL=powerDataRuntimeInstance.js.map