import type { IComponentSchema } from '../serialization/IComponentSchema';
import type { IMatrixContext } from '../engine/core/IMatrixContext';
import { type ISchemaEvalResult, type ISchemaEvalOptions } from './SchemaEvaluator';
/**
 * Result of format-agnostic component creation.
 */
export interface ICreateResult extends ISchemaEvalResult {
    /** The parsed schema (for introspection) */
    schema: IComponentSchema;
}
/**
 * Options for component creation.
 */
export interface ICreateOptions extends ISchemaEvalOptions {
    /** Validation mode */
    validate?: 'strict' | 'loose' | 'none';
}
/**
 * Create a component from JSON schema.
 *
 * This is the most direct path - JSON IS the schema format.
 *
 * @param json - JSON string or object representing IComponentSchema
 * @param context - Parent context for the component
 * @param options - Creation options
 * @returns Created component result
 *
 * @example
 * ```typescript
 * const result = await createFromJson({
 *   name: 'Counter',
 *   accepts: { increment: { params: {} } },
 *   emits: { changed: { payload: { value: { type: 'number' } } } },
 *   handlers: {
 *     increment: 'this.count++; this.emit("changed", { value: this.count });'
 *   },
 *   state: { count: 0 }
 * }, context);
 * ```
 */
export declare function createFromJson(json: string | IComponentSchema, context: IMatrixContext, options?: ICreateOptions): Promise<ICreateResult>;
/**
 * Create a component from HTML markup.
 *
 * Parses custom element syntax and evaluates to running component.
 *
 * @param html - HTML string with Matrix custom elements
 * @param context - Parent context for the component
 * @param options - Creation options
 * @returns Created component result
 *
 * @example
 * ```typescript
 * const result = await createFromHtml(`
 *   <matrix-counter id="myCounter">
 *     <mx-accepts method="increment"></mx-accepts>
 *     <mx-emits event="changed" value="number"></mx-emits>
 *     <script type="handler/increment">
 *       this.count++;
 *       this.emit('changed', { value: this.count });
 *     </script>
 *   </matrix-counter>
 * `, context);
 * ```
 */
export declare function createFromHtml(html: string, context: IMatrixContext, options?: ICreateOptions): Promise<ICreateResult>;
/**
 * Create a component from S-expression (LISP) syntax.
 *
 * Full circle: LISP syntax → Matrix component → running actor.
 *
 * @param sexpr - S-expression string
 * @param context - Parent context for the component
 * @param options - Creation options
 * @returns Created component result
 *
 * @example
 * ```typescript
 * const result = await createFromSExpr(`
 *   (component "Counter"
 *     (accepts "increment")
 *     (emits "changed" (payload (value number)))
 *     (handler "increment"
 *       (lambda (payload)
 *         (begin
 *           (set! count (+ count 1))
 *           (emit "changed" (obj ("value" count)))))))
 * `, context);
 * ```
 */
export declare function createFromSExpr(sexpr: string, context: IMatrixContext, options?: ICreateOptions): Promise<ICreateResult>;
/**
 * Create a component directly from a schema object.
 *
 * This is the core method that all other createFrom* methods use.
 * Use this when you already have a schema and want direct evaluation.
 *
 * @param schema - Component schema
 * @param context - Parent context for the component
 * @param options - Creation options
 * @returns Created component result
 */
export declare function createFromSchema(schema: IComponentSchema, context: IMatrixContext, options?: ICreateOptions): Promise<ICreateResult>;
/**
 * Detect the format of a source string.
 */
export declare function detectFormat(source: string): 'html' | 'sexpr' | 'json' | 'unknown';
/**
 * Create a component from any supported format (auto-detected).
 *
 * @param source - Source string in any supported format
 * @param context - Parent context for the component
 * @param options - Creation options
 * @returns Created component result
 */
export declare function createFromAny(source: string, context: IMatrixContext, options?: ICreateOptions): Promise<ICreateResult>;
//# sourceMappingURL=ComponentFactory.d.ts.map