var _excluded = ["disabled", "icon", "id", "name", "more", "onClick"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React, { forwardRef } from 'react';
import FooterBarButton from "./../Button";
import FooterBarTab from "./../Tab";
var Buttons = /*#__PURE__*/forwardRef(function (_ref, ref) {
  var buttons = _ref.buttons;
  return /*#__PURE__*/React.createElement(React.Fragment, null, buttons.map(function (button, index) {
    var _button$id2;
    var disabled = button.disabled,
      icon = button.icon,
      id = button.id,
      name = button.name,
      more = button.more,
      onClick = button.onClick,
      buttonProps = _objectWithoutProperties(button, _excluded);
    if (button.type === 'tab') {
      var _button$id;
      return /*#__PURE__*/React.createElement(FooterBarTab, {
        key: (_button$id = button === null || button === void 0 ? void 0 : button.id) !== null && _button$id !== void 0 ? _button$id : index,
        disabled: disabled,
        more: more,
        icon: icon,
        id: id,
        name: name,
        onClick: onClick
      });
    }
    return /*#__PURE__*/React.createElement(FooterBarButton, _extends({
      key: (_button$id2 = button === null || button === void 0 ? void 0 : button.id) !== null && _button$id2 !== void 0 ? _button$id2 : index,
      disabled: disabled,
      onClick: onClick
    }, buttonProps), button.name);
  }));
});
export default Buttons;