import { JSONSchema } from '../schema-context';
/**
 * Unified x:ui configuration types
 */
export type XUIString = string;
export interface XUIObject {
    /** Widget type - takes precedence over format */
    widget?: string;
    /** Format type - fallback if widget not specified */
    format?: string;
    /** Widget-specific options */
    [key: string]: unknown;
}
export type XUIConfig = XUIString | XUIObject;
/**
 * Resolved widget information with precedence applied
 */
export interface ResolvedWidget {
    /** The effective widget type */
    widget: string;
    /** Source of the widget selection for debugging */
    source: 'explicit-widget' | 'explicit-format' | 'schema-format' | 'schema-media' | 'constraints' | 'heuristics' | 'type-fallback';
    /** Additional options from x:ui object */
    options?: Record<string, unknown>;
}
/**
 * Extract x:ui configuration from schema definition
 */
export declare function getXUIConfig(definition: JSONSchema): XUIConfig | undefined;
/**
 * Resolve effective widget with precedence rules:
 * 1. Explicit x:ui.widget
 * 2. Explicit x:ui.format (or x:ui as string)
 * 3. Schema format property
 * 4. Schema contentMediaType/contentEncoding
 * 5. Schema constraints (enum, const, min/max, etc.)
 * 6. Heuristics (property names, length bounds)
 * 7. Type fallback
 */
export declare function resolveWidget(definition: JSONSchema, propertyName?: string): ResolvedWidget | undefined;
/**
 * Legacy function for backward compatibility
 * @deprecated Use resolveWidget instead
 */
export declare function getUIFormat(definition: JSONSchema): string | undefined;
