/**
 * JSON-to-Component Rendering Utilities
 *
 * This module provides utilities for rendering AINativeKit UI components
 * from JSON configuration objects, enabling AI-powered code generation
 * and dynamic UI rendering.
 */
import { type ComponentType, type ReactNode } from 'react';
import { type ButtonProps } from '../components/Button';
import { type AlertProps } from '../components/Alert';
import { type BadgeProps } from '../components/Badge';
import { type ChipProps } from '../components/Chip';
import { type IconProps } from '../components/Icon';
import { type SkeletonProps } from '../components/Skeleton';
import { type CardProps, type SummaryCardProps, type ImageCardProps, type ListCardProps } from '../components/Card';
import { type CarouselProps } from '../components/Carousel';
import { type ListProps, type ListItemProps } from '../components/List';
/**
 * Component configuration for JSON-based rendering
 */
export interface ComponentConfig {
    /** Component type name (e.g., "Button", "SummaryCard") */
    type: string;
    /** Component props as key-value pairs */
    props?: Record<string, unknown>;
    /** Child components or text content */
    children?: ComponentConfig[] | string;
    /** Optional key for React reconciliation */
    key?: string | number;
}
/**
 * Type-safe component props mapping
 */
export interface ComponentPropsMap {
    Button: ButtonProps;
    Alert: AlertProps;
    Badge: BadgeProps;
    Chip: ChipProps;
    Icon: IconProps;
    Skeleton: SkeletonProps;
    Card: CardProps;
    SummaryCard: SummaryCardProps;
    ImageCard: ImageCardProps;
    ListCard: ListCardProps;
    Carousel: CarouselProps;
    List: ListProps;
    ListItem: ListItemProps;
}
/**
 * Registry of available components for JSON rendering
 */
declare const COMPONENT_REGISTRY: Record<string, ComponentType<any>>;
/**
 * Component names that support JSON-to-component rendering
 */
export type SupportedComponentType = keyof typeof COMPONENT_REGISTRY;
/**
 * Type guard to check if a component type is supported
 */
export declare function isSupportedComponent(type: string): type is SupportedComponentType;
/**
 * Render a single component from JSON configuration
 *
 * @param config - Component configuration object
 * @returns React element or null if component not found
 *
 * @example
 * ```tsx
 * const buttonConfig = {
 *   type: 'Button',
 *   props: { variant: 'primary' },
 *   children: 'Click me'
 * };
 * const button = renderComponent(buttonConfig);
 * ```
 */
export declare function renderComponent(config: ComponentConfig): ReactNode;
/**
 * Render multiple components from JSON configuration array
 *
 * @param configs - Array of component configuration objects
 * @returns Array of React elements
 *
 * @example
 * ```tsx
 * const configs = [
 *   { type: 'Button', props: { variant: 'primary' }, children: 'Save' },
 *   { type: 'Button', props: { variant: 'secondary' }, children: 'Cancel' }
 * ];
 * const buttons = renderComponents(configs);
 * ```
 */
export declare function renderComponents(configs: ComponentConfig[]): ReactNode[];
/**
 * Type-safe component configuration creator
 *
 * @param type - Component type name
 * @param props - Component props
 * @param children - Child content
 * @returns Component configuration object
 *
 * @example
 * ```tsx
 * const config = createComponentConfig('Button', { variant: 'primary' }, 'Click me');
 * const button = renderComponent(config);
 * ```
 */
export declare function createComponentConfig<T extends SupportedComponentType>(type: T, props?: Partial<ComponentPropsMap[T extends keyof ComponentPropsMap ? T : never]>, children?: ComponentConfig[] | string): ComponentConfig;
/**
 * Validate component configuration against component type
 *
 * @param config - Component configuration to validate
 * @returns Validation result with errors if any
 *
 * @example
 * ```tsx
 * const config = { type: 'Button', props: { variant: 'invalid' } };
 * const result = validateComponentConfig(config);
 * if (!result.valid) {
 *   console.error(result.errors);
 * }
 * ```
 */
export declare function validateComponentConfig(config: ComponentConfig): {
    valid: boolean;
    errors: string[];
};
/**
 * Batch render components with error handling
 *
 * @param configs - Array of component configurations
 * @returns Object with successfully rendered components and errors
 *
 * @example
 * ```tsx
 * const configs = [
 *   { type: 'Button', props: { variant: 'primary' }, children: 'Save' },
 *   { type: 'InvalidComponent', props: {} } // This will error
 * ];
 * const { components, errors } = renderComponentsBatch(configs);
 * ```
 */
export declare function renderComponentsBatch(configs: ComponentConfig[]): {
    components: ReactNode[];
    errors: Array<{
        index: number;
        error: string;
    }>;
};
export {};
//# sourceMappingURL=renderFromJSON.d.ts.map