import { NetManager } from "../libs/tw/manager/NetManager";
import { DataManager } from "../libs/tw/manager/DataManager";
import { NetName } from "../libs/tw/enum/NetName";
import { Buried } from "../libs/tw/util/Buried";


export class NetPromise {
    private static instance: NetPromise;

    public static get ins(): NetPromise {
        if (!this.instance) {
            this.instance = new NetPromise();
        }
        return this.instance;
    }

    constructor() {}


    exposure = []
	dpm = []
    dcm = []
    
    showLog(i){
        var appId = window["CFG"].appId;
        var oaId = window["CFG"].activityId;
        this.dpm[i] = `${appId}.110.${i}.1`;
		this.dcm[i] = `202.${oaId}.0.0`;
		this.exposure[i] = Buried.createExposure(this.dpm[i], this.dcm[i]);
        NetManager.ins.showLog(this.exposure[i]);
    }

    clickLog(i){
        var appId = window["CFG"].appId;
        var oaId = window["CFG"].activityId;
        this.dpm[i] = `${appId}.110.${i}.1`;
		this.dcm[i] = `202.${oaId}.0.0`;
		this.exposure[i] = Buried.createExposure(this.dpm[i], this.dcm[i]);
        NetManager.ins.clickLog(this.exposure[i]);
    }
  
}