import { NCIRCC_DASHBOARD, useTranslation } from 'core/i18n';
import { TypeNCIRCCMessages } from './types';

export function useNCIRCCMessages(): TypeNCIRCCMessages {
  const { t } = useTranslation([NCIRCC_DASHBOARD]);

  return {
    ncirccNotificationMessages: {
      messengerPostMessageErrorTitle: t(
        'ncircc_dashboard:app.ncircc_dashboard.messenger_post_message_error_title',
      ),
      messengerPostMessageErrorSubTitle: t(
        'ncircc_dashboard:app.ncircc_dashboard.messenger_post_message_error_sub_title',
      ),
      notificationNoData: t(
        'ncircc_dashboard:app.ncircc_dashboard.notification_no_data',
      ),
      messengerInputPlaceholder: t(
        'ncircc_dashboard:app.ncircc_dashboard.messenger_input_placeholder',
      ),
      messengerInputSubmit: t(
        'ncircc_dashboard:app.ncircc_dashboard.messenger_input_submit',
      ),
      noMessage: t('ncircc_dashboard:app.ncircc_dashboard.message_no_data'),
    },
    organizationCardMessages: {
      name: {
        title: t(
          'ncircc_dashboard:app.ncircc_dashboard.organization_card.name_organization',
        ),
        validateMessage: t(
          'ncircc_dashboard:app.ncircc_dashboard.organization_card.name_organization.validate_message',
        ),
      },
      personal_account_NCCC: t(
        'ncircc_dashboard:app.ncircc_dashboard.organization_card.personal_account_NCCC',
      ),
      subject_CII: t(
        'ncircc_dashboard:app.ncircc_dashboard.organization_card.subject_CII',
      ),
      location: {
        title: t(
          'ncircc_dashboard:app.ncircc_dashboard.organization_card.country',
        ),
        validateMessage: t(
          'ncircc_dashboard:app.ncircc_dashboard.organization_card.country.validate_message',
        ),
      },
      city: {
        title: t(
          'ncircc_dashboard:app.ncircc_dashboard.organization_card.city',
        ),
        validateMessage: t(
          'ncircc_dashboard:app.ncircc_dashboard.organization_card.city.validate_message',
        ),
      },
      sphere_func_subject: {
        title: t(
          'ncircc_dashboard:app.ncircc_dashboard.organization_card.sphere_func_subject',
        ),
        validateMessage: t(
          'ncircc_dashboard:app.ncircc_dashboard.organization_card.sphere_func_subject.validate_message',
        ),
      },
      api_key: {
        title: t('ncircc_dashboard:app.ncircc_dashboard.api.token_api'),
        validateMessage: t(
          'ncircc_dashboard:app.ncircc_dashboard.api.token_api.validate_message',
        ),
      },
      save: t('ncircc_dashboard:app.ncircc_dashboard.organization_card.save'),
      notification: {
        saveSuccess: t(
          'ncircc_dashboard:app.ncircc_dashboard.organization_card.save.notification.success.title',
        ),
        saveError: {
          title: t(
            'ncircc_dashboard:app.ncircc_dashboard.organization_card.save.notification.error.title',
          ),
          subTitle: (str) =>
            t(
              'ncircc_dashboard:app.ncircc_dashboard.organization_card.save.notification.error.sub_title',
              {
                fields: str,
              },
            ),
        },
        fetchError: t(
          'ncircc_dashboard:app.ncircc_dashboard.organization_card.fetch.notification.error.title',
        ),
      },
    },
  };
}
