System.register(["cc"], function (_export, _context) {
  "use strict";

  var _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, Component, tween, UIOpacity, _dec, _class, _crd, ccclass, property, NewComponent;

  return {
    setters: [function (_cc) {
      _cclegacy = _cc.cclegacy;
      __checkObsolete__ = _cc.__checkObsolete__;
      __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
      _decorator = _cc._decorator;
      Component = _cc.Component;
      tween = _cc.tween;
      UIOpacity = _cc.UIOpacity;
    }],
    execute: function () {
      _crd = true;

      _cclegacy._RF.push({}, "7e93409YgdJTr6klo0FatIU", "NewComponent", undefined);

      __checkObsolete__(['_decorator', 'Component', 'Node', 'tween', 'UIOpacity']);

      ({
        ccclass,
        property
      } = _decorator);

      _export("NewComponent", NewComponent = (_dec = ccclass('NewComponent'), _dec(_class = class NewComponent extends Component {
        constructor() {
          super(...arguments);
          this.flag = 1;
        }

        start() {}

        update(deltaTime) {}

        changeOpacity() {
          if (this.flag == 0) {
            console.log("flag=0");
            tween(this.node.getComponent(UIOpacity)).set({
              opacity: 1
            }).delay(0).to(0.15, {
              opacity: 255
            }).call(() => {
              this.flag = 1;
            }).start();
          } else {
            console.log("flag=1");
            tween(this.node.getComponent(UIOpacity)).set({
              opacity: 1
            }).delay(0).to(0.15, {
              opacity: 255
            }).delay(0.4).to(0.15, {
              opacity: 1
            }).call(() => {
              this.node.getComponent(UIOpacity).opacity = 1;
              this.flag = 0;
            }).start();
          }
        }

        changeActive(num) {
          for (var i = 0; i < this.node.children.length; i++) {
            if (i == Number(num)) {
              this.node.children[i].active = true;
            } else {
              this.node.children[i].active = false;
            }
          }
        }

      }) || _class));

      _cclegacy._RF.pop();

      _crd = false;
    }
  };
});
//# sourceMappingURL=70365deab624fb14f815c9d9b9427e3bcd0583ef.js.map