import { __assign } from "tslib";
/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */
import { TTIMonitor } from '../../monitors/performance/tti-monitor';
import { applyMonitor } from '../../utils';
import { defaultPerformancePrecollect } from './performance';
import { getPluginConfig, reportOnInitCommonParams } from './utils';
export var TTI_MONITOR_PLUGIN_NAME = 'tti';
export { TTIMonitor };
export function TTIMonitorPlugin(client) {
    client.on('init', function () {
        var config = getPluginConfig(client, TTI_MONITOR_PLUGIN_NAME, {});
        if (!config) {
            return;
        }
        var precollect = client.pp || defaultPerformancePrecollect;
        // TODO：如果新增SPA方法，需要重置 reportOnInitCommonParams
        applyMonitor(TTIMonitor, __assign(__assign({}, config), { precollect: precollect }), reportOnInitCommonParams(client));
    });
}
//# sourceMappingURL=tti.js.map