import { useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { EmojiGroupId } from '../../plugins/emoji';

export type IEmojiGroupLabels = Record<EmojiGroupId, string>;

export const useEmojiGroupLabels = (): IEmojiGroupLabels => {
  const { t } = useTranslation();
  return useMemo(
    () => ({
      [EmojiGroupId.People]: t('EmojiBoard.cat_people'),
      [EmojiGroupId.Nature]: t('EmojiBoard.cat_nature'),
      [EmojiGroupId.Food]: t('EmojiBoard.cat_food'),
      [EmojiGroupId.Activity]: t('EmojiBoard.cat_activity'),
      [EmojiGroupId.Travel]: t('EmojiBoard.cat_travel'),
      [EmojiGroupId.Object]: t('EmojiBoard.cat_object'),
      [EmojiGroupId.Symbol]: t('EmojiBoard.cat_symbol'),
      [EmojiGroupId.Flag]: t('EmojiBoard.cat_flag'),
    }),
    [t]
  );
};
