import { CowSwapWidgetParams } from './types'; /** * When `true`, invalid `baseUrl` values throw and stop widget creation. * When `false`, invalid values are reported with `console.error` and the iframe falls back to the production host. */ export declare const SHOULD_THROW_IF_INVALID_URL = false; /** * Normalizes `baseUrl` for the widget iframe `src` and rejects unsafe values. * - Omits or blank `baseUrl` → production default (https://swap.cow.fi). * - Allows `https:` for any host (self-hosted / staging). * - Allows `http:` only on local dev loopback hostnames. * @param throwIfInvalid Overrides {@link SHOULD_THROW_IF_INVALID_URL} (e.g. for unit tests). * @throws {Error} When validation fails and `throwIfInvalid` is true (see {@link SHOULD_THROW_IF_INVALID_URL}). */ export declare function sanitizeWidgetBaseUrl(baseUrl: string | undefined, throwIfInvalid?: boolean): string; export declare function buildWidgetUrl(params: Partial): string; export declare function buildWidgetPath(params: Partial): string; export declare function buildWidgetUrlQuery(params: Partial): URLSearchParams;