/**
 * @module builder
 * @description Fluent builder API for defining forms and controls
 */
import type { JsonValue } from "../../../types/index.ts";
import type { FormControl, FormControlDependency, FormControlOption, FormDefinition, FormDefinitionHooks } from "./types.ts";
export declare class ControlBuilder {
    private control;
    constructor(key: string);
    static field(key: string): ControlBuilder;
    static text(key: string): ControlBuilder;
    static email(key: string): ControlBuilder;
    static number(key: string): ControlBuilder;
    static boolean(key: string): ControlBuilder;
    static select(key: string, options: FormControlOption[]): ControlBuilder;
    static date(key: string): ControlBuilder;
    static file(key: string): ControlBuilder;
    type(type: string): this;
    required(): this;
    optional(): this;
    hidden(): this;
    sensitive(): this;
    readonly(): this;
    multiple(): this;
    pattern(regex: string): this;
    min(n: number): this;
    max(n: number): this;
    minLength(n: number): this;
    maxLength(n: number): this;
    enum(values: string[]): this;
    options(opts: FormControlOption[]): this;
    label(label: string): this;
    ask(prompt: string): this;
    description(desc: string): this;
    hint(...hints: string[]): this;
    example(value: string): this;
    confirmThreshold(n: number): this;
    accept(mimeTypes: string[]): this;
    maxSize(bytes: number): this;
    maxFiles(n: number): this;
    roles(...roles: string[]): this;
    default(value: JsonValue): this;
    dependsOn(field: string, condition?: FormControlDependency["condition"], value?: JsonValue): this;
    dbbind(columnName: string): this;
    section(name: string): this;
    order(n: number): this;
    placeholder(text: string): this;
    helpText(text: string): this;
    widget(type: string): this;
    i18n(locale: string, translations: {
        label?: string;
        description?: string;
        askPrompt?: string;
        helpText?: string;
    }): this;
    meta(key: string, value: JsonValue): this;
    build(): FormControl;
}
export declare class FormBuilder {
    private form;
    constructor(id: string);
    static create(id: string): FormBuilder;
    name(name: string): this;
    description(desc: string): this;
    version(v: number): this;
    control(builder: ControlBuilder | FormControl): this;
    controls(...builders: (ControlBuilder | FormControl)[]): this;
    required(...keys: string[]): this;
    optional(...keys: string[]): this;
    roles(...roles: string[]): this;
    allowMultiple(): this;
    noUndo(): this;
    noSkip(): this;
    noAutofill(): this;
    maxUndoSteps(n: number): this;
    ttl(config: {
        minDays?: number;
        maxDays?: number;
        effortMultiplier?: number;
    }): this;
    noNudge(): this;
    nudgeAfter(hours: number): this;
    nudgeMessage(message: string): this;
    onStart(workerName: string): this;
    onFieldChange(workerName: string): this;
    onReady(workerName: string): this;
    onSubmit(workerName: string): this;
    onCancel(workerName: string): this;
    onExpire(workerName: string): this;
    hooks(hooks: FormDefinitionHooks): this;
    debug(): this;
    i18n(locale: string, translations: {
        name?: string;
        description?: string;
    }): this;
    meta(key: string, value: JsonValue): this;
    build(): FormDefinition;
}
export declare const Form: typeof FormBuilder;
export declare const C: typeof ControlBuilder;
//# sourceMappingURL=builder.d.ts.map