/**
 * Data Transforms
 * Convert FluidOS API responses to RepAppData format.
 *
 * This is the main entry point for all transforms used by the SDK client
 * and hooks when fetching from the fluidos API.
 */
export { transformThemes, buildThemeDefinition, getActiveThemeId, type RawApiTheme, } from "@fluid-app/portal-core/theme";
export { normalizeComponentTree, toScreenDefinition, type RawApiScreen, } from "./screen-transforms";
export { toNavigationItem, type RawApiNavigationItem, } from "./navigation-transforms";
import type { AppManifestResponse } from "@fluid-app/portal-core/app-definition-types";
import type { RepAppData, RepAppManifest } from "@fluid-app/portal-core/types";
import { type RawApiTheme } from "@fluid-app/portal-core/theme";
import { type RawApiScreen } from "./screen-transforms";
import { type RawApiNavigationItem } from "./navigation-transforms";
/**
 * Raw manifest shape consumed by the transform pipeline.
 *
 * A structural superset of `AppManifestResponse` that also accommodates
 * the legacy `RepAppData` fixtures produced by
 * `packages/cli/portal/src/vite-plugin/build-manifest.ts` in dev mode.
 * Fields that are optional here are either (a) never emitted by
 * `/api/app/manifest` or (b) emitted only by the dev-mode fixture. In both
 * cases `transformManifestToRepAppData` supplies `?? fallback` defaults.
 */
export interface RawManifestResponse {
    manifest: {
        definition_id?: number;
        published_version?: number;
        screens?: RawApiScreen[];
        profile?: {
            name?: string;
            definition_id?: number;
            themes?: RawApiTheme[];
            navigation?: {
                id?: number;
                name?: string;
                definition_id?: number;
                navigation_items?: RawApiNavigationItem[];
            };
            mobile_navigation?: {
                id?: number;
                name?: string;
                definition_id?: number;
                navigation_items?: RawApiNavigationItem[];
            };
        };
    };
}
/**
 * Convert an `AppManifestResponse` into the `RawManifestResponse` shape
 * expected by the transform pipeline. `AppManifestResponse` is structurally
 * assignable to `RawManifestResponse`, so this is a runtime-only guard that
 * rejects empty payloads.
 */
export declare function toRawManifest(response: AppManifestResponse): RawManifestResponse;
/**
 * Transform a raw FluidOS manifest API response into RepAppData.
 *
 * Handles:
 * - Theme transformation (legacy and new formats)
 * - Screen normalization (component_tree array wrapping)
 * - Navigation item transformation (recursive with position sorting)
 */
export declare function transformManifestToRepAppData(response: RawManifestResponse): RepAppData;
/**
 * Transform a raw manifest response, unwrapping the `{ manifest }` envelope.
 * Convenience wrapper matching the `RepAppManifest` type.
 */
export declare function transformRawManifest(response: RawManifestResponse): RepAppManifest;
//# sourceMappingURL=index.d.ts.map