import Panel from "../views/Panel";
import AchievementItem from "../item/AchievementItem";
import LayoutGroup, { LineLayoutGroupType } from "../components/LayoutGroup";
import { GDispatcher } from "../../libs/tc/util/GDispatcher";
import { DataManager } from "../../libs/tw/manager/DataManager";
import { NetName } from "../../libs/tw/enum/NetName";

export default class AchievementPanel extends Panel {
    public get skinKey() { return "AchievementPanel" }

    public dataGroup: eui.DataGroup;

   

    onSkinComplete() {
        super.onSkinComplete();
        let data=DataManager.ins.getData(NetName.EVOLUTION_RECORD_KUWO).data
        (this.dataGroup.dataProvider as eui.ArrayCollection).source = [
            {
                id: 2,
                locked: false
            },
            {
                id: 3,
                locked: false
            },
            {
                id: 4,
                locked: false
            },
            {
                id: 5,
                locked: false
            },
            {
                id: 6,
                locked: false
            },
            {
                id: 7,
                locked: false
            }
        ];

        this.dataGroup.itemRenderer = AchievementItem;
    }

    envent_s

    initEvents(){
        super.initEvents()
        GDispatcher.addEvent("closeAchievement",this.onTouchTap,this)
    }

    removeEvents(){
        super.removeEvents()
        GDispatcher.removeEvent("closeAchievement",this.onTouchTap,this)
    }
}