"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const node_cache_1 = __importDefault(require("@cacheable/node-cache"));
const Defaults_1 = require("../Defaults");
const business_1 = require("./business");
// export the last socket layer
const makeWASocket = (config) => {
    config = {
        ...Defaults_1.DEFAULT_CONNECTION_CONFIG,
        ...config,
    };
    if (!config.lidCache) {
        config.lidCache = new node_cache_1.default({
            stdTTL: Defaults_1.DEFAULT_CACHE_TTLS.LID_JID,
            useClones: false
        });
    }
    return (0, business_1.makeBusinessSocket)(config);
};
exports.default = makeWASocket;
