/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ import type { LocaleModule } from '@lit/localize'; /** * Configuration parameters for lit-localize when in SSR mode. */ export interface SsrConfiguration { /** * Required locale code in which source templates in this project are written, * and the active locale. */ sourceLocale: string; /** * Required locale codes that are supported by this project. Should not * include the `sourceLocale` code. */ targetLocales: string[]; /** * Required function that returns the localized templates for the given locale * code. * * This function will only ever be called with a `locale` that is contained by * `targetLocales`. */ loadLocale: (locale: string) => Promise; } /** * Set configuration parameters for lit-localize when in SSR mode. * * Throws if called more than once. */ export declare const configureSsrLocalization: ({ sourceLocale, targetLocales, loadLocale, }: SsrConfiguration) => Promise<{ withLocale: (locale: string, callback: () => void) => void; }>;