import { Injector, Provider } from '@angular/core';
import { provideTranslateService } from '@ngx-translate/core';

import { AppI18nService } from './app-i18n.service';

/** Vitest/Injector harness providers for components and services that inject AppI18nService. */
export function provideAppI18nForTests(): Provider[] {
  return [
    provideTranslateService({
      fallbackLang: 'en',
      lang: 'en'
    }),
    AppI18nService
  ];
}

export function initializeAppI18nForTests(injector: Injector): void {
  injector.get(AppI18nService).initialize();
}
