import React from 'react';
import { appearancePropsMap } from './appearancePropsMap';
export const getDropdownOption = (intl, dispatchCommand, {
  disabled,
  onClick,
  selected,
  appearance,
  testId,
  tooltip,
  description
}) => {
  const {
    title,
    icon: Icon
  } = appearancePropsMap[appearance !== null && appearance !== void 0 ? appearance : 'url'];
  return {
    title: intl.formatMessage(title),
    icon: /*#__PURE__*/React.createElement(Icon, {
      label: intl.formatMessage(title)
    }),
    onClick: () => dispatchCommand(onClick),
    disabled: Boolean(disabled),
    testId,
    selected,
    tooltip: tooltip !== null && tooltip !== void 0 ? tooltip : '',
    description
  };
};