import { NetManager } from "../libs/tw/manager/NetManager";


export class NetPromise {
    private static instance: NetPromise;

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

    constructor() {}

    getPetInfoKuwo(){
		return new Promise((success1,error1)=>{
			NetManager.ins.getPetInfoKuwo((success)=>{
				if(!success){
                    error1()
				}
				success1()
			},window["CFG"].activityId)
		})
    }

    petInteractionKuwo(petId,type){
        return new Promise((success1,error1)=>{
            NetManager.ins.petInteractionKuwo((success)=>{
                if(!success){
                    error1()
                }
                success1()
            },petId,type,window["signId"])
        })
    }
}