import { InjectionToken, Provider } from '@angular/core';
import { ValtechEnv } from '../../config/site-links.config';
import * as i0 from "@angular/core";
/**
 * Config for cross-app legal/site link resolution.
 *
 * Used by satellite apps (showcase, sigify, admin-portal, …) to point their legal
 * and site links (terms, privacy, about, contact, …) to the main marketing site,
 * which owns the canonical legal content. The main site itself does NOT call
 * `provideValtechLegal` — its links stay relative.
 */
export interface ValtechLegalConfig {
    /**
     * Absolute base URL of the main site (no trailing slash).
     * @example 'https://myvaltech.com'
     */
    baseUrl?: string;
    /** Open resolved external links in a new tab. Defaults to `true` when `baseUrl` is set. */
    openInNewTab?: boolean;
}
export declare const VALTECH_LEGAL_CONFIG: InjectionToken<ValtechLegalConfig>;
/**
 * Resolves legal/site paths against a configurable main-site base URL.
 *
 * - **Main site mode**: no `provideValtechLegal` called → `resolve('/legal/terms')` returns `/legal/terms` (relative).
 * - **Satellite mode**: `provideValtechLegal({ baseUrl: 'https://myvaltech.com' })` → `resolve('/legal/terms')` returns `'https://myvaltech.com/legal/terms'` and `isExternal('/legal/terms')` returns `true`.
 *
 * Absolute URLs passed in are returned unchanged (no double-prefix).
 */
export declare class LegalLinkService {
    private readonly config;
    /** Effective base URL (null if running as main site). */
    get baseUrl(): string | null;
    /** Whether resolved external links should open in a new tab. */
    get openInNewTab(): boolean;
    /**
     * Returns the URL to use for a given internal path. Absolute URLs pass through.
     *
     * When `locale` is provided AND the resolved URL would be cross-origin, appends
     * `?lang={locale}` so the main site can render the legal doc in the user's
     * active language (instead of its default). Locale is omitted for same-origin
     * resolves since the main site reads locale from its own `LocaleService`.
     *
     * @example
     * resolve('/legal/terms')
     *   // main site:  '/legal/terms'
     *   // satellite:  'https://myvaltech.com/legal/terms'
     *
     * resolve('/legal/terms', { locale: 'pt' })
     *   // main site:  '/legal/terms'  (locale stays implicit)
     *   // satellite:  'https://myvaltech.com/legal/terms?lang=pt'
     *
     * resolve('https://x.com/y') // unchanged
     */
    resolve(path: string, options?: {
        locale?: string;
    }): string;
    /** `true` if the path would be resolved to a cross-origin URL. */
    isExternal(path: string): boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<LegalLinkService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<LegalLinkService>;
}
/**
 * Wires `LegalLinkService` for satellite apps. Omit in the main site (the one
 * that hosts the canonical /legal/* routes) so links stay relative.
 *
 * @example
 * // main.ts of showcase / sigify / etc.
 * provideValtechLegal({
 *   baseUrl: 'https://myvaltech.com',
 *   openInNewTab: true,
 * }),
 */
export declare function provideValtechLegal(config: ValtechLegalConfig): Provider;
/**
 * Wiring de una sola línea para que una app satélite apunte sus links de sitio
 * (legal, soporte, contacto, …) a `web` —la landing de marca— en el ambiente
 * correcto. Resuelve el `baseUrl` desde `VALTECH_WEB_BASE_URLS` según el `env`
 * baked en build-time (`environment.valtechEnv`) y delega en `provideValtechLegal`.
 *
 * Ambiente desconocido/ausente → fallback a `prod` (ver `resolveWebBaseUrl`).
 * El main site (`web`) NO llama esto — sus links quedan relativos.
 *
 * @example
 * // main.ts de showcase / sigify / …
 * import { environment } from './environments/environment';
 * provideValtechSite(environment.valtechEnv),  // 'local' | 'dev' | 'prod'
 *
 * @see resolveWebBaseUrl
 * @see VALTECH_SITE_PATHS — catálogo de paths estándar que viven en `web`.
 */
export declare function provideValtechSite(env?: ValtechEnv | string | null, options?: {
    openInNewTab?: boolean;
}): Provider;
