import { Data } from "../../mk/data/Data";
import { AdData } from "./AdData";
import { AppData } from "./AppData";
import { GameData } from "./GameData";
import { HttpData } from "./HttpData";
import { LoginData } from "./LoginData";
import { StorageData } from "./StorageData";
import { WechatData } from "./WechatData";
import { HelpData } from "./module/HelpData";
import { PigBankData } from "./module/PigBankData";
import { TurnableData } from "./module/TurnableData";
import { SignData } from "./module/SignData";
import { PushData } from "./module/PushData";
import { FissionData } from "./module/FissionData";
import { LuckyBagData } from "./module/LuckyBagData";
import { CashNormalData } from "./module/CashNormalData";
import { CashPigData } from "./module/CashPigData";

/**
 * 数据集合全局类
 * @description 所有数据都通过这个类创建，修改，删除
 * @author 邹勇
 */
class GData {
    constructor() {
        this.init();
    }

    public loginData: LoginData;
    public appData: AppData;
    public gameData: GameData;
    public wechatData: WechatData;
    public httpData: HttpData;
    public adData: AdData;
    public storageData: StorageData;

    //module
    public help: HelpData;
    public push: PushData;
    public turnable: TurnableData;
    public fission: FissionData;
    public pigbank: PigBankData;
    public luckybag: LuckyBagData;
    public sign: SignData;
    public cashNormal: CashNormalData;
    public cashPig: CashPigData;

    init() {
        this.appData = new AppData();
        this.loginData = new LoginData();
        this.gameData = new GameData();
        this.wechatData = new WechatData();
        this.httpData = new HttpData();
        this.adData = new AdData();
        this.storageData = new StorageData();

        this.help = new HelpData();
        this.pigbank = new PigBankData();
        this.push = new PushData();
        this.turnable = new TurnableData();
        this.fission = new FissionData();
        this.pigbank = new PigBankData();
        this.luckybag = new LuckyBagData();
        this.sign = new SignData();
        this.cashNormal = new CashNormalData();
        this.cashPig = new CashPigData();
    }
}

/**
 * 提现模块的功能ID
 */
export enum Fun {
    push = 1,       //互推
    turnable = 2,   //转盘
    fission = 3,    //裂变
    pigbank = 4,    //存钱罐
    luckybag = 5,   //福袋
    sign = 6,       //签到
    cashNormal = 7, //常规提现
    cashPig = 8,    //金猪提现
}

declare global {
    const gData: GData;
}
window['gData'] = new GData();



