/**
 * Type-safe node builder types
 *
 * These types prevent common mistakes like putting 'children' in props
 * by explicitly excluding reserved keys at compile time.
 */
import type { NodeDefinition } from './schema';
/**
 * Reserved keys that should NEVER appear in node props.
 * These are top-level NodeDefinition properties that would conflict if placed in props.
 *
 * Note: 'type' is NOT included because components may legitimately need a 'type' prop
 * (e.g., Accordion needs type="single"). The NodeDefinition.type is separate from props.type.
 */
type ReservedNodeKeys = 'children' | 'key' | '$bind' | '$when' | '$repeat' | '$scopes';
/**
 * Props type that explicitly excludes reserved keys.
 * This makes it a compile-time error to pass children, $bind, etc. in props.
 *
 * @example
 * // ✅ OK
 * const props: NodeProps = { className: 'flex', gap: 'md' }
 *
 * // ❌ Type error - 'children' is not allowed in props
 * const props: NodeProps = { className: 'flex', children: [...] }
 */
export type NodeProps = Record<string, unknown> & {
    [K in ReservedNodeKeys]?: never;
};
/**
 * Type-safe version of the el() function signature.
 * Ensures props cannot contain reserved keys.
 */
export type ElementBuilder = (type: string, props?: NodeProps | null, children?: Array<NodeDefinition | null | undefined> | null, ...mods: Array<(node: NodeDefinition) => NodeDefinition>) => NodeDefinition;
/**
 * Type guard to check if props contain reserved keys at runtime.
 * Use this in development mode to catch bugs early.
 *
 * @param props - Props object to validate
 * @returns Array of reserved keys found in props, or empty array if none
 */
export declare function findReservedKeysInProps(props: Record<string, unknown> | null | undefined): ReservedNodeKeys[];
/**
 * Validates that props don't contain reserved keys.
 * Throws in development, warns in production.
 *
 * @param props - Props to validate
 * @param context - Context for error message (e.g., "el('grid', ...)")
 */
export declare function validateProps(props: Record<string, unknown> | null | undefined, context?: string): void;
/**
 * Helper type to infer proper props for specific node types.
 * Can be extended to provide type-specific prop validation.
 */
export type NodeTypeProps<T extends string> = T extends 'grid' ? NodeProps & {
    cols?: unknown;
    gap?: unknown;
} : T extends 'stack' | 'inline' ? NodeProps & {
    gap?: unknown;
    align?: unknown;
    justify?: unknown;
    className?: unknown;
} : T extends 'text' | 'richText' ? NodeProps & {
    as?: string;
    className?: unknown;
    size?: never;
    weight?: never;
} : NodeProps;
export {};
