"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var toolbar_buttons_exports = {};
__export(toolbar_buttons_exports, {
  ToolbarButtons: () => ToolbarButtons
});
module.exports = __toCommonJS(toolbar_buttons_exports);
class ToolbarButtons {
  constructor(toolbarButtons) {
    this._toolbarButtons = toolbarButtons;
  }
  get toolbarButtons() {
    return this._toolbarButtons;
  }
  getButtonByIndex(index) {
    return this._toolbarButtons[index];
  }
  isEmpty() {
    return this._toolbarButtons.length === 0;
  }
  addButton(toolbarButton) {
    this._toolbarButtons.push(toolbarButton);
  }
  getButtonsElements() {
    return this._toolbarButtons.map((toolbarButton) => toolbarButton.getButtonElement());
  }
  getButtonsElementsWithDataHook() {
    return this._toolbarButtons.map((toolbarButton) => toolbarButton.getButtonElementWithDataHook());
  }
  getFirstButtonDataHook() {
    if (this.isEmpty()) {
      return null;
    }
    const firstButton = this._toolbarButtons[0];
    return firstButton.getButtonDataHook();
  }
  getLastButtonDataHook() {
    if (this.isEmpty()) {
      return null;
    }
    const lastButton = this._toolbarButtons[this._toolbarButtons.length - 1];
    return lastButton.getButtonDataHook();
  }
}
//# sourceMappingURL=toolbar-buttons.js.map
