const { Sha256 } = require("@aws-crypto/sha256-js");
const { invalidFunction } = require("@smithy/core/client");
const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
const getRuntimeConfig = (config) => {
    const browserDefaults = getBrowserRuntimeConfig(config);
    return {
        ...browserDefaults,
        ...config,
        runtime: "react-native",
        eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? (() => ({
            handle: invalidFunction("event stream request is not supported in ReactNative."),
        })),
        sha256: config?.sha256 ?? Sha256,
    };
};
exports.getRuntimeConfig = getRuntimeConfig;
