import { FOREIGN_KEY_ENTITIES_TABLE, useTranslation } from 'core/i18n';

export type ForeignKeyEntitiesTableMessages = {
  editList: string;
  id: string;
  name: string;
  description: string;
  save: string;
  cancel: string;
  delete: string;
  deleteConfirmation: string;
  edit: string;
  create: string;
  createItem: string;
  success: string;
  failure: string;
  total: string;
  addNew: string;
  searchByName: string;
  emptyList: string;
};

export function useForeignKeyEntitiesTableMessages(): ForeignKeyEntitiesTableMessages {
  const { t } = useTranslation([FOREIGN_KEY_ENTITIES_TABLE]);

  return {
    editList: t(
      'foreign_key_entities_table:app.foreign_key_entities_table.edit_list',
    ),
    id: t('foreign_key_entities_table:app.foreign_key_entities_table.id'),
    name: t('foreign_key_entities_table:app.foreign_key_entities_table.name'),
    description: t(
      'foreign_key_entities_table:app.foreign_key_entities_table.description',
    ),
    save: t('foreign_key_entities_table:app.foreign_key_entities_table.save'),
    cancel: t(
      'foreign_key_entities_table:app.foreign_key_entities_table.cancel',
    ),
    delete: t(
      'foreign_key_entities_table:app.foreign_key_entities_table.delete',
    ),
    deleteConfirmation: t(
      'foreign_key_entities_table:app.foreign_key_entities_table.delete_confirmation',
    ),
    edit: t('foreign_key_entities_table:app.foreign_key_entities_table.edit'),
    create: t(
      'foreign_key_entities_table:app.foreign_key_entities_table.create',
    ),
    createItem: t(
      'foreign_key_entities_table:app.foreign_key_entities_table.create_item',
    ),
    success: t(
      'foreign_key_entities_table:app.foreign_key_entities_table.success',
    ),
    failure: t(
      'foreign_key_entities_table:app.foreign_key_entities_table.failure',
    ),
    total: t('foreign_key_entities_table:app.foreign_key_entities_table.total'),
    addNew: t(
      'foreign_key_entities_table:app.foreign_key_entities_table.add_new',
    ),
    searchByName: t(
      'foreign_key_entities_table:app.foreign_key_entities_table.search_by_name',
    ),
    emptyList: t(
      'foreign_key_entities_table:app.foreign_key_entities_table.empty_list',
    ),
  };
}
