System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4", "__unresolved_5", "__unresolved_6", "__unresolved_7"], function (_export, _context) {
  "use strict";

  var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, BasePanel, Data, platformSystem, constants, audioManager, settingData, auto, _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _crd, ccclass, property, SettingLayer;

  function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }

  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }

  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }

  function _reportPossibleCrUseOfBasePanel(extras) {
    _reporterNs.report("BasePanel", "../../../core/component/BasePanel", _context.meta, extras);
  }

  function _reportPossibleCrUseOfData(extras) {
    _reporterNs.report("Data", "../../../core/manager/Data", _context.meta, extras);
  }

  function _reportPossibleCrUseOfplatformSystem(extras) {
    _reporterNs.report("platformSystem", "db://assets/platform/platformSystem", _context.meta, extras);
  }

  function _reportPossibleCrUseOfconstants(extras) {
    _reporterNs.report("constants", "db://assets/data/constants", _context.meta, extras);
  }

  function _reportPossibleCrUseOfaudioManager(extras) {
    _reporterNs.report("audioManager", "db://assets/manager/audioManager", _context.meta, extras);
  }

  function _reportPossibleCrUseOfsettingData(extras) {
    _reporterNs.report("settingData", "db://assets/data/settingData", _context.meta, extras);
  }

  function _reportPossibleCrUseOfauto(extras) {
    _reporterNs.report("auto", "db://assets/manager/autoBind", _context.meta, extras);
  }

  return {
    setters: [function (_unresolved_) {
      _reporterNs = _unresolved_;
    }, function (_cc) {
      _cclegacy = _cc.cclegacy;
      __checkObsolete__ = _cc.__checkObsolete__;
      __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
      _decorator = _cc._decorator;
    }, function (_unresolved_2) {
      BasePanel = _unresolved_2.default;
    }, function (_unresolved_3) {
      Data = _unresolved_3.default;
    }, function (_unresolved_4) {
      platformSystem = _unresolved_4.default;
    }, function (_unresolved_5) {
      constants = _unresolved_5.constants;
    }, function (_unresolved_6) {
      audioManager = _unresolved_6.default;
    }, function (_unresolved_7) {
      settingData = _unresolved_7.default;
    }, function (_unresolved_8) {
      auto = _unresolved_8.auto;
    }],
    execute: function () {
      _crd = true;

      _cclegacy._RF.push({}, "c06a8SQHlJK+rTVgNI5Yvcr", "SettingLayer", undefined);

      __checkObsolete__(['_decorator', 'Node']);

      ({
        ccclass,
        property
      } = _decorator);

      _export("SettingLayer", SettingLayer = (_dec = ccclass('SettingLayer'), _dec2 = _crd && auto === void 0 ? (_reportPossibleCrUseOfauto({
        error: Error()
      }), auto) : auto, _dec3 = _crd && auto === void 0 ? (_reportPossibleCrUseOfauto({
        error: Error()
      }), auto) : auto, _dec4 = _crd && auto === void 0 ? (_reportPossibleCrUseOfauto({
        error: Error()
      }), auto) : auto, _dec5 = _crd && auto === void 0 ? (_reportPossibleCrUseOfauto({
        error: Error()
      }), auto) : auto, _dec(_class = (_class2 = class SettingLayer extends (_crd && BasePanel === void 0 ? (_reportPossibleCrUseOfBasePanel({
        error: Error()
      }), BasePanel) : BasePanel) {
        constructor() {
          super(...arguments);

          _initializerDefineProperty(this, "sound_on_icon", _descriptor, this);

          _initializerDefineProperty(this, "sound_off_icon", _descriptor2, this);

          _initializerDefineProperty(this, "vibration_on_icon", _descriptor3, this);

          _initializerDefineProperty(this, "vibration_off_icon", _descriptor4, this);
        }

        start() {
          (_crd && platformSystem === void 0 ? (_reportPossibleCrUseOfplatformSystem({
            error: Error()
          }), platformSystem) : platformSystem).platform.showInterstitialAd();
          this.updateUI();
        }

        updateUI() {
          this.sound_on_icon.active = (_crd && Data === void 0 ? (_reportPossibleCrUseOfData({
            error: Error()
          }), Data) : Data).user.soundVolume != 0;
          this.sound_off_icon.active = (_crd && Data === void 0 ? (_reportPossibleCrUseOfData({
            error: Error()
          }), Data) : Data).user.soundVolume == 0;
          this.vibration_on_icon.active = (_crd && Data === void 0 ? (_reportPossibleCrUseOfData({
            error: Error()
          }), Data) : Data).user.vibration != 0;
          this.vibration_off_icon.active = (_crd && Data === void 0 ? (_reportPossibleCrUseOfData({
            error: Error()
          }), Data) : Data).user.vibration == 0;
        }

        onBtnClicked(event, customEventData) {
          (_crd && audioManager === void 0 ? (_reportPossibleCrUseOfaudioManager({
            error: Error()
          }), audioManager) : audioManager).playOneShot((_crd && constants === void 0 ? (_reportPossibleCrUseOfconstants({
            error: Error()
          }), constants) : constants).audios.btnclick);
          var btnName = event.target.name;

          switch (btnName) {
            case "btn_close":
              this.close();
              break;

            case "btn_sound":
              (_crd && settingData === void 0 ? (_reportPossibleCrUseOfsettingData({
                error: Error()
              }), settingData) : settingData).changeStatus(1);
              (_crd && Data === void 0 ? (_reportPossibleCrUseOfData({
                error: Error()
              }), Data) : Data).user.soundVolume = (_crd && Data === void 0 ? (_reportPossibleCrUseOfData({
                error: Error()
              }), Data) : Data).user.soundVolume == 0 ? 1 : 0;
              this.updateUI();
              break;

            case "btn_vibration":
              (_crd && Data === void 0 ? (_reportPossibleCrUseOfData({
                error: Error()
              }), Data) : Data).user.vibration = (_crd && Data === void 0 ? (_reportPossibleCrUseOfData({
                error: Error()
              }), Data) : Data).user.vibration == 0 ? 1 : 0;
              this.updateUI();
              break;
          }
        }

      }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "sound_on_icon", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "sound_off_icon", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "vibration_on_icon", [_dec4], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "vibration_off_icon", [_dec5], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));

      _cclegacy._RF.pop();

      _crd = false;
    }
  };
});
//# sourceMappingURL=9ec6b47385971be0e086c75f13cae8dc27f89291.js.map