"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.initAppClient = void 0;
const enum_1 = require("@/@types/enum");
const constants_1 = require("@/@types/constants");
const app_client_manager_1 = require("./app-client-manager");
const iwdp_app_client_1 = require("./iwdp-app-client");
const tunnel_app_client_1 = require("./tunnel-app-client");
const ws_app_client_1 = require("./ws-app-client");
const initAppClient = () => {
    const { tunnel } = global.debugAppArgv;
    const DefaultCtor = tunnel === enum_1.DebugTunnel.WS ? ws_app_client_1.WSAppClient : tunnel_app_client_1.TunnelAppClient;
    app_client_manager_1.appClientManager.addAndroidAppClientOption({
        useAllDomain: true,
        Ctor: DefaultCtor,
        platform: enum_1.DevicePlatform.Android,
    });
    app_client_manager_1.appClientManager.addIOSAppClientOption({
        useAllDomain: false,
        acceptDomains: constants_1.customDomains,
        Ctor: DefaultCtor,
        platform: enum_1.DevicePlatform.IOS,
    });
    app_client_manager_1.appClientManager.addIOSAppClientOption({
        useAllDomain: false,
        ignoreDomains: constants_1.customDomains,
        Ctor: iwdp_app_client_1.IWDPAppClient,
        platform: enum_1.DevicePlatform.IOS,
    });
};
exports.initAppClient = initAppClient;
