import Panel from "../views/Panel";
import ScoreItem from "../item/ScoreItem";
import DefaultCallback from "../Decorator/DefaultCallback";

@DefaultCallback
export default class ScorePanel extends Panel {
    public get skinKey() { return "ScorePanel" }
    public get groupName() { return "score_panel" }

    public list: eui.List;
    public closeBtn: eui.Button;

    onSkinComplete() {
        super.onSkinComplete();
        let data = [];
        for (let i = 0; i <= 100; i++) {
            data.push({
                musicName: "缺氧",
                singer: "杨丞琳",
                favorite: true
            });
        }
        this.list.dataProvider = new eui.ArrayCollection(data);
        this.list.itemRenderer = ScoreItem;
    }
}

