import type { BaseThemeOptions, CustomPaletteSet, CustomTheme, CustomThemes, GeneratedPalettes, GenerateThemeParams } from './theming';
export declare const assignIfDefined: (target: Record<string, unknown>, key: string, value: unknown) => void;
/**
 * Maps a legacy palette-based theme to theme-engine seed + overrides.
 *
 * Legacy themes use `palette` (single scheme) or `palettes` (light/dark) with
 * explicit color values. This function translates those values into the dotted
 * token paths that `generateTheme` expects.
 *
 * Mapping reference: https://www.figma.com/design/bUbUpAHJl8xGEtFbpYZ5z3/Theme?node-id=0-1&p=f&m=dev
 */
export declare const mapLegacyThemeToCustomTheme: (legacyTheme: CustomTheme) => GenerateThemeParams;
/**
 * Reverse of mapLegacyThemeToCustomTheme.
 * Takes the resolved token maps from a generated theme and maps them back to the
 * legacy CustomPaletteSet shape so that workspace apps still on the legacy theme
 * system can consume them.
 */
export declare const mapGeneratedPalettesToLegacyPalettes: (generatedPalettes: GeneratedPalettes) => {
    light: CustomPaletteSet;
    dark: CustomPaletteSet;
};
export declare const mapLegacyBrandIcons: (legacyBrand: BaseThemeOptions["brand"]) => GenerateThemeParams[1];
/**
 * Converts legacy CustomThemes (from old workspace platforms v23.0.22 and earlier)
 * into GeneratedPalettes with toCSS() methods and a ready-to-inject palette sheet.
 *
 * This is the backward-compatibility bridge: when a new workspace app (home, dock,
 * storefront) discovers it's running against a legacy platform — detected by
 * `getGeneratedPalettes()` throwing because the channel action doesn't exist —
 * it calls `getThemes()` to retrieve the old-format themes and runs them through
 * this function to produce the same output the new pipeline expects.
 *
 * The conversion mirrors `initialiseStoragePalettes` in client-api-platform but
 * omits storage controller side-effects (setPalettes, setThemePaletteSheet) since
 * those belong to the platform init path, not the workspace app consumption path.
 *
 * Theme shape discrimination:
 * - `palette`: single palette applied to both schemes (legacy single-scheme theme)
 * - `palettes`: explicit light/dark palettes (legacy dual-scheme theme)
 * - `seed`: already a token-based theme (should not reach this path, but handled for safety)
 */
export declare const convertLegacyThemesToGeneratedPalettes: (themes: CustomThemes | null | undefined) => {
    generatedPalettes: GeneratedPalettes;
    themePaletteSheet: string;
};
