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 NetBuried {
    private static instance: NetBuried;

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

    constructor() {}


    exposure = []
	dpm = []
    dcm = []
    
    showLog(i,d?){
        var appId =window["appId"];
        var oaId =window["projectId"];
        if(d){
            this.dpm[i] = `${appId}.110.${i}.${d}`;
        }else{
            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,d?){
        var appId =window["appId"];
        var oaId =window["projectId"];
        if(d){
            this.dpm[i] = `${appId}.110.${i}.${d}`;
        }else{
            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]);
    }
  
}