import Panel from "../../Module/Panel";
import { _decorator, Button, Label, Node, Sprite, } from "cc";
import store from "../store/store";
import { observer, render } from "../store/decorators";
import { changeScene } from "../../Module/UIFast";
import { PropPage } from "../Scenes/PropPage";

const { ccclass, property } = _decorator;

@observer
@ccclass('MyBagItem')
export default class MyBagItem extends Panel {

  static bundle = "MyBagItem";
  static skin = "MyBagItem";

  @property(Node) goCheck: Node = null; // 去查看
  @property(Node) goBuy: Node = null; // 去购买
  @property(Node) goDress: Node = null; // 去穿
  // @property(Node) Derssed: Node = null; // 已穿


  onLoad() {
    // this.goCheck.on(Button.EventType.CLICK, this.handleCheck);
    // this.goBuy.on(Button.EventType.CLICK, this.handleBuy);
    // this.goDress.on(Button.EventType.CLICK, this.handleDress);
  }

  async start() {


  }

  handleCheck = () => {
    console.log("handleCheck");
  }

  handleBuy = async () => {
    console.log("handleBuy");
    this.hidePanel()
    await changeScene(PropPage)
  }

  handleDress = () => {
    console.log("handleDress");
  }
}
