"use strict";

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

  var _decorator, Component, Node, SliderComponent, ProgressBarComponent, _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2, _temp, ccclass, property, AudioController;

  _export({
    _dec: void 0,
    _dec2: void 0,
    _dec3: void 0,
    _class: void 0,
    _class2: void 0,
    _descriptor: void 0,
    _descriptor2: void 0,
    _temp: void 0
  });

  return {
    setters: [function (_cc) {
      _decorator = _cc._decorator;
      Component = _cc.Component;
      Node = _cc.Node;
      SliderComponent = _cc.SliderComponent;
      ProgressBarComponent = _cc.ProgressBarComponent;
    }],
    execute: function () {
      cc._RF.push(window.module || {}, "8b6264pBCxHULhtQJO/QC5B", "AudioController"); // begin AudioController


      ccclass = _decorator.ccclass;
      property = _decorator.property;

      _export("AudioController", AudioController = (_dec = ccclass("AudioController"), _dec2 = property({
        type: Node
      }), _dec3 = property({
        type: Node
      }), _dec(_class = (_class2 = (_temp =
      /*#__PURE__*/
      function (_Component) {
        babelHelpers.inherits(AudioController, _Component);

        function AudioController() {
          var _babelHelpers$getProt;

          var _this;

          babelHelpers.classCallCheck(this, AudioController);

          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }

          _this = babelHelpers.possibleConstructorReturn(this, (_babelHelpers$getProt = babelHelpers.getPrototypeOf(AudioController)).call.apply(_babelHelpers$getProt, [this].concat(args)));
          babelHelpers.initializerDefineProperty(_this, "musicScroll", _descriptor, babelHelpers.assertThisInitialized(_this));
          babelHelpers.initializerDefineProperty(_this, "audioScroll", _descriptor2, babelHelpers.assertThisInitialized(_this));
          _this.musicBar = null;
          _this.audioBar = null;
          return _this;
        }

        babelHelpers.createClass(AudioController, [{
          key: "onLoad",
          value: function onLoad() {
            this.musicBar = this.musicScroll.getChildByName("Handle").getComponent(ProgressBarComponent);
            this.audioBar = this.audioScroll.getChildByName("Handle").getComponent(ProgressBarComponent);
          }
        }, {
          key: "update",
          value: function update() {
            this.musicBar.progress = this.musicScroll.getComponent(SliderComponent).progress;
            this.audioBar.progress = this.audioScroll.getComponent(SliderComponent).progress;
          }
        }, {
          key: "onVolumeSliderChanged",
          value: function onVolumeSliderChanged(eventTarget) {// this.audioSource.volume = eventTarget.progress;
          }
        }]);
        return AudioController;
      }(Component), _temp), (_descriptor = babelHelpers.applyDecoratedDescriptor(_class2.prototype, "musicScroll", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      }), _descriptor2 = babelHelpers.applyDecoratedDescriptor(_class2.prototype, "audioScroll", [_dec3], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));

      cc._RF.pop(); // end AudioController

    }
  };
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByb2plY3Q6Ly8vYXNzZXRzL3N1Yi90cy9BdWRpb0NvbnRyb2xsZXIudHMiXSwibmFtZXMiOlsiX2RlY29yYXRvciIsIkNvbXBvbmVudCIsIk5vZGUiLCJTbGlkZXJDb21wb25lbnQiLCJQcm9ncmVzc0JhckNvbXBvbmVudCIsImNjY2xhc3MiLCJwcm9wZXJ0eSIsIkF1ZGlvQ29udHJvbGxlciIsInR5cGUiLCJtdXNpY0JhciIsImF1ZGlvQmFyIiwibXVzaWNTY3JvbGwiLCJnZXRDaGlsZEJ5TmFtZSIsImdldENvbXBvbmVudCIsImF1ZGlvU2Nyb2xsIiwicHJvZ3Jlc3MiLCJldmVudFRhcmdldCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBU0EsTUFBQUEsVSxPQUFBQSxVO0FBQVlDLE1BQUFBLFMsT0FBQUEsUztBQUFXQyxNQUFBQSxJLE9BQUFBLEk7QUFBTUMsTUFBQUEsZSxPQUFBQSxlO0FBQWtFQyxNQUFBQSxvQixPQUFBQSxvQjs7O3NGQUUvQjs7O0FB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