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

export type TypeLicenseActivationPageLocale = {
  licenseActivationError: string;
  tokenRequestError: string;
  activateNewLicense: string;
  manualActivation: string;
  serial: string;
  getToken: string;
  placeHereProductSerialNumber: string;
  token: string;
  sendThisTextToLicenseServer: string;
  license: string;
  activate: string;
  selectLicenseFile: string;
  licenseHasBeenActivated: string;
};

export const useLicenseActivationPageLocale =
  (): TypeLicenseActivationPageLocale => {
    const { t } = useTranslation([LICENSE]);

    return {
      licenseActivationError: t('license:app.license.license_activation_error'),
      tokenRequestError: t('license:app.license.token_request_error'),
      activateNewLicense: t('license:app.license.activate_new_license'),
      manualActivation: t('license:app.license.manual_activation'),
      serial: t('license:app.license.serial'),
      getToken: t('license:app.license.get_token'),
      placeHereProductSerialNumber: t(
        'license:app.license.place_here_product_serial_number',
      ),
      token: t('license:app.license.token'),
      sendThisTextToLicenseServer: t(
        'license:app.license.send_this_text_to_license_server',
      ),
      license: t('license:app.license.license'),
      activate: t('license:app.license.activate'),
      selectLicenseFile: t('license:app.license.select_license_file'),
      licenseHasBeenActivated: t(
        'license:app.license.license_has_been_activated',
      ),
    };
  };
