"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "appearancePropsMap", {
  enumerable: true,
  get: function get() {
    return _appearancePropsMap2.appearancePropsMap;
  }
});
exports.getButtonGroupOption = void 0;
var _appearancePropsMap2 = require("./appearancePropsMap");
var getButtonGroupOption = exports.getButtonGroupOption = function getButtonGroupOption(intl, areAnyNewToolbarFlagsEnabled, dispatchCommand, _ref) {
  var disabled = _ref.disabled,
    _onClick = _ref.onClick,
    selected = _ref.selected,
    appearance = _ref.appearance,
    testId = _ref.testId,
    tooltip = _ref.tooltip;
  var _appearancePropsMap = _appearancePropsMap2.appearancePropsMap[appearance !== null && appearance !== void 0 ? appearance : 'url'],
    title = _appearancePropsMap.title,
    icon = _appearancePropsMap.icon;
  return {
    title: intl.formatMessage(title),
    icon: icon,
    onClick: function onClick() {
      return dispatchCommand(_onClick);
    },
    disabled: Boolean(disabled),
    tooltipContent: tooltip || null,
    testId: testId,
    selected: selected,
    areAnyNewToolbarFlagsEnabled: areAnyNewToolbarFlagsEnabled
  };
};
// eslint-disable-next-line @atlaskit/editor/no-re-export