import Panel from "../views/Panel";
import { NetBuried } from "../NetBuried";

export default class LearnedMusicPanel extends Panel {
    public get skinKey() { return "LearnedMusicPanel" }
    public btnOk: eui.Button;
    public musicName: eui.Label;
    public singerName: eui.Label;
    public iconArea: eui.Image;

    onSkinComplete() {
        super.onSkinComplete();
        NetBuried.ins.showLog(28)
        this.btnOk.addEventListener(egret.TouchEvent.TOUCH_TAP, this.hidePanel, this);
        this.musicName.text = this.data["musicName"];
        this.singerName.text = this.data["singerName"];
        this.iconArea.source = this.data["pic"];
        
    }

    /**
     * @param data
     */
    constructor(data: any) {
        super(data);
    }


    hidePanel(){
        super.hidePanel()
        this.data.callback()
    }
}