// App
// -----------------------------------------------------------------------------
import { ACCOUNTS_DASHBOARD, useTranslation } from 'core/i18n';
import { GenericDashboardLocale } from 'components/GenericDashboard';

export interface AccountsDashboardLocale extends GenericDashboardLocale {
  tableMessages: {
    id: string;
    login: string;
    fio: string;
    email: string;
    status: string;
    actions: string;
  };
  currentUser: string;
  cannotDeleteCurrentUser: string;
  active: string;
  blocked: string;
  cannotDeactivateCurrentUser: string;
  isActive: string;
  isActiveExtra: string;
  login: string;
  loginError: string;
  fio: string;
  fioError: string;
  email: string;
  emailError: string;
  password: string;
  newPassword: string;
  passwordError: string;
  repeatPassword: string;
  repeatNewPassword: string;
  repeatPasswordError: string;
  oldPassword: string;
  timezone: string;
  expireDate: string;
  expireDateExtra: string;
  fieldIsRequired: string;
}

export const useAccountsDashboardLocale = (): AccountsDashboardLocale => {
  const { t } = useTranslation([ACCOUNTS_DASHBOARD]);

  return {
    tableMessages: {
      id: t('accounts_dashboard:app.accounts_dashboard.tableMessages.id'),
      login: t('accounts_dashboard:app.accounts_dashboard.tableMessages.login'),
      fio: t('accounts_dashboard:app.accounts_dashboard.tableMessages.fio'),
      email: t('accounts_dashboard:app.accounts_dashboard.tableMessages.email'),
      status: t(
        'accounts_dashboard:app.accounts_dashboard.tableMessages.status',
      ),
      actions: t(
        'accounts_dashboard:app.accounts_dashboard.tableMessages.actions',
      ),
    },
    creationSuccess: t(
      'accounts_dashboard:app.accounts_dashboard.creationSuccess',
    ),
    creationError: t('accounts_dashboard:app.accounts_dashboard.creationError'),
    updateSuccess: t('accounts_dashboard:app.accounts_dashboard.updateSuccess'),
    updateError: t('accounts_dashboard:app.accounts_dashboard.updateError'),
    deletionSuccess: t(
      'accounts_dashboard:app.accounts_dashboard.deletionSuccess',
    ),
    deletionError: t('accounts_dashboard:app.accounts_dashboard.deletionError'),
    deletionConfirmation: t(
      'accounts_dashboard:app.accounts_dashboard.deletionConfirmation',
    ),
    add: t('accounts_dashboard:app.accounts_dashboard.add'),
    delete: t('accounts_dashboard:app.accounts_dashboard.delete'),
    edit: t('accounts_dashboard:app.accounts_dashboard.edit'),
    newEntity: t('accounts_dashboard:app.accounts_dashboard.newEntity'),
    currentUser: t('accounts_dashboard:app.accounts_dashboard.currentUser'),
    cannotDeleteCurrentUser: t(
      'accounts_dashboard:app.accounts_dashboard.cannotDeleteCurrentUser',
    ),
    active: t('accounts_dashboard:app.accounts_dashboard.active'),
    blocked: t('accounts_dashboard:app.accounts_dashboard.blocked'),
    cannotDeactivateCurrentUser: t(
      'accounts_dashboard:app.accounts_dashboard.cannotDeactivateCurrentUser',
    ),
    isActive: t('accounts_dashboard:app.accounts_dashboard.isActive'),
    isActiveExtra: t('accounts_dashboard:app.accounts_dashboard.isActiveExtra'),
    login: t('accounts_dashboard:app.accounts_dashboard.login'),
    loginError: t('accounts_dashboard:app.accounts_dashboard.loginError'),
    fio: t('accounts_dashboard:app.accounts_dashboard.fio'),
    fioError: t('accounts_dashboard:app.accounts_dashboard.fioError'),
    email: t('accounts_dashboard:app.accounts_dashboard.email'),
    emailError: t('accounts_dashboard:app.accounts_dashboard.emailError'),
    password: t('accounts_dashboard:app.accounts_dashboard.password'),
    newPassword: t('accounts_dashboard:app.accounts_dashboard.newPassword'),
    passwordError: t('accounts_dashboard:app.accounts_dashboard.passwordError'),
    repeatPassword: t(
      'accounts_dashboard:app.accounts_dashboard.repeatPassword',
    ),
    repeatNewPassword: t(
      'accounts_dashboard:app.accounts_dashboard.repeatNewPassword',
    ),
    repeatPasswordError: t(
      'accounts_dashboard:app.accounts_dashboard.repeatPasswordError',
    ),
    oldPassword: t('accounts_dashboard:app.accounts_dashboard.oldPassword'),
    timezone: t('accounts_dashboard:app.accounts_dashboard.timezone'),
    expireDate: t('accounts_dashboard:app.accounts_dashboard.expireDate'),
    expireDateExtra: t(
      'accounts_dashboard:app.accounts_dashboard.expireDateExtra',
    ),
    fieldIsRequired: t(
      'accounts_dashboard:app.accounts_dashboard.fieldIsRequired',
    ),
  };
};
