import { z } from 'zod';

interface FormStep {
    id: string;
    title: string;
}
interface FormSchemaMetadata {
    /** Multi-step form step definitions */
    steps?: FormStep[];
    /** Map of field names to their step indices */
    stepGroupMap?: Record<string, number>;
}
interface JsonSchemaProperty {
    type?: string;
    format?: string;
    formatMinimum?: string;
    formatMaximum?: string;
    stepGroup?: number;
    properties?: Record<string, JsonSchemaProperty>;
    [key: string]: unknown;
}
interface FormJsonSchema {
    type?: string;
    properties?: Record<string, JsonSchemaProperty>;
    required?: string[];
    steps?: FormStep[];
    stepGroupMap?: Record<string, number>;
    [key: string]: unknown;
}
/**
 * Convert a Zod schema to JSON Schema with proper handling for:
 * - z.date() → { type: "string", format: "date-time" }
 * - Date min/max constraints → formatMinimum/formatMaximum
 * - Steps metadata (if provided via schema.meta() or explicit metadata param)
 *
 * @param schema - The Zod schema to convert
 * @param metadata - Optional explicit metadata to include (overrides schema meta)
 */
declare function zodToFormSchema<T extends z.ZodType>(schema: T, metadata?: FormSchemaMetadata): FormJsonSchema;
/**
 * Convert JSON Schema to Zod schema with proper handling for:
 * - { type: "string", format: "date-time" } → date field (with constraints)
 * - Steps metadata re-attachment (preserved via .meta())
 * - Step group mapping
 *
 * @param jsonSchema - The JSON Schema to convert
 * @returns A Zod schema ready for validation, with all metadata preserved
 */
declare function formSchemaToZod(jsonSchema: FormJsonSchema): z.ZodType;
/**
 * Check if a JSON Schema has multi-step configuration.
 */
declare function hasSteps(jsonSchema: FormJsonSchema): boolean;
/**
 * Get steps from a JSON Schema.
 */
declare function getSteps(jsonSchema: FormJsonSchema): FormStep[];
/**
 * Get the step group map from a JSON Schema.
 * Returns a map of field names to step indices.
 */
declare function getStepGroupMap(jsonSchema: FormJsonSchema): Record<string, number>;

export { getStepGroupMap as a, formSchemaToZod as f, getSteps as g, hasSteps as h, zodToFormSchema as z };
export type { FormStep as F, FormSchemaMetadata as b };
