/** * An alternate URL for a given language. */ export interface Alternate { lang: string; url: string; } /** * Manage the UI URL. */ export default class UiUrlAnalyzer { private readonly availableLangs; /** * The URL used to identify language. */ static readonly LANG_URL: string; /** * The parameter name extracting language code from URL. */ static readonly LANG_PARAM: string; /** * The part of the URL containing the language. */ readonly langUrl: string; /** * The part of the URL after the language string. */ readonly endUrl: string; /** * The alternate paths for alternate languages. */ private _alternates?; /** * Create the object. * * @param url - The URL to analyze. * @param availableLangs - The available language codes. */ constructor(url: string, availableLangs: string[]); /** * @returns The URL without the language part. */ get cleanUrl(): string; /** * @returns The alternate URLs for available languages. */ get alternates(): Alternate[]; }