text: /* @flow */
  import type {EditorState} from 'draft-js';
  
  export type StyleConfig = {
    label: string;
    style: string;
    className?: string;
  };
  
  type GetControlState = (key: string) => ?string;
  type SetControlState = (key: string, value: string) => void;
  
  export type CustomControl = ReactNode | (set: SetControlState, get: GetControlState, state: EditorState) => ReactNode;
  export type CustomControlList = Array<CustomControl>;
  
  export type StyleConfigList = Array<StyleConfig>;
  
  export type GroupName = 'INLINE_STYLE_BUTTONS' | 'BLOCK_TYPE_BUTTONS' | 'LINK_BUTTONS' | 'BLOCK_TYPE_DROPDOWN' | 'HISTORY_BUTTONS' | 'IMAGE_BUTTON' | 'SPECIAL_CHARACTERS_BUTTONS';
  
  export type ToolbarConfig = {
    display: Array<GroupName>;
    extraProps?: Object;
    INLINE_STYLE_BUTTONS: StyleConfigList;
    BLOCK_TYPE_DROPDOWN: StyleConfigList;
    BLOCK_TYPE_BUTTONS: StyleConfigList;
    SPECIAL_CHARACTERS_BUTTONS: StyleConfigList;
  };
  
  export const INLINE_STYLE_BUTTONS: StyleConfigList = [
    {label: 'Bold', style: 'BOLD'},
    {label: 'Italic', style: 'ITALIC'},
    {label: 'Strikethrough', style: 'STRIKETHROUGH'},
    {label: 'Monospace', style: 'CODE'},
    {label: 'Underline', style: 'UNDERLINE'},
  ];
  
  export const BLOCK_TYPE_DROPDOWN: StyleConfigList = [
    {label: 'Normal', style: 'unstyled'},
    {label: 'Heading Large', style: 'header-one'},
    {label: 'Heading Medium', style: 'header-two'},
    {label: 'Heading Small', style: 'header-three'},
    {label: 'Code Block', style: 'code-block'},
  ];
  export const BLOCK_TYPE_BUTTONS: StyleConfigList = [
    {label: 'UL', style: 'unordered-list-item'},
    {label: 'OL', style: 'ordered-list-item'},
    {label: 'Blockquote', style: 'blockquote'},
  ];
  
  export const SPECIAL_CHARACTERS_BUTTONS: any = [
    {
      description: 'Keep words on the same line',
      icon: '⎵',
      label: 'Non-Breaking Space',
      style: 'non-breaking-space',
      unicode: '\u23B5',
      htmlEntity: '&nbsp;',
    },
    {
      description: 'End line here and begin another',
      icon: '↲',
      label: 'Line Separator',
      style: 'line-separator',
      unicode: '\u21B2',
      htmlEntity: '&#8232;',
    },
    {
      description: 'Insert opportunity for line break on overflow text',
      icon: '↫',
      label: 'Zero-Width Space',
      style: 'zero-width-space',
      unicode: '\u21AB',
      htmlEntity: '​​​​&#8203;',
    },
  ];
  
  let EditorToolbarConfig: ToolbarConfig = {
    display: ['INLINE_STYLE_BUTTONS', 'BLOCK_TYPE_BUTTONS', 'LINK_BUTTONS', 'IMAGE_BUTTON', 'BLOCK_TYPE_DROPDOWN', 'HISTORY_BUTTONS', 'SPECIAL_CHARACTERS_BUTTONS'],
    INLINE_STYLE_BUTTONS,
    BLOCK_TYPE_DROPDOWN,
    BLOCK_TYPE_BUTTONS,
    SPECIAL_CHARACTERS_BUTTONS,
  };
  
  export default EditorToolbarConfig;
  