"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createMetriportApi = void 0;
const api_sdk_1 = require("@metriport/api-sdk");
const settings_zod_1 = require("./validation/settings.zod");
const createMetriportApi = (payloadSettings) => {
    const { apiKey, baseUrl } = settings_zod_1.settingsSchema.parse(payloadSettings);
    if (baseUrl !== undefined && baseUrl.length > 0) {
        return new api_sdk_1.MetriportMedicalApi(apiKey, {
            baseAddress: baseUrl,
        });
    }
    return new api_sdk_1.MetriportMedicalApi(apiKey, {
        sandbox: true,
    });
};
exports.createMetriportApi = createMetriportApi;
//# sourceMappingURL=client.js.map