"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.GridFoldersBIReporter = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _bexCore = require("@wix/bex-core");
var _bi = require("@wix/bex-core/bi");
var _uuid = require("uuid");
class GridFoldersBIReporter {
  get reportBi() {
    return this.state.toolbar.reportBi;
  }
  constructor(params) {
    (0, _defineProperty2.default)(this, "state", void 0);
    this.state = params.state;
  }
  onToggleShowAllButtonClick() {
    const {
      state
    } = this;
    const ctaId = (0, _uuid.v4)();
    this.reportBi((0, _bexCore.withoutDefaults)(_bi.cairoSectionCtaClicked)({
      ...state.collections.folders._commonDynamicBiParams(),
      ctaId,
      ...{
        ctaName: state.showAllFolders ? 'show all' : 'show less'
      },
      sectionType: 'Folders'
    }));
  }
}
exports.GridFoldersBIReporter = GridFoldersBIReporter;
//# sourceMappingURL=GridFoldersBIReporter.js.map