import { type InteractiveIslandProps } from '../../../contracts/islands';
import { type FormFieldGroup } from './form-layout';
import type { FormRecord } from './form.types';
export type FormSourceProps = Readonly<{
    value?: FormRecord;
    siteId?: string;
    apiBaseUrl?: string;
    submitLabel?: string;
    successMessage?: string | null;
    className?: string;
    spamProtectionEnabled?: boolean;
}>;
export type FormDisplay = Readonly<{
    kind: 'form';
    state: 'missing' | 'ready';
    className: string | null;
    formId: string | null;
    submitLabel: string;
    successMessage: string | null;
    form: FormRecord | null;
    groups: readonly FormFieldGroup[];
}>;
export type FormHydration = Readonly<{
    spamProtectionEnabled?: boolean;
}>;
type FormIslandMeta = Readonly<{
    siteId?: string;
    apiBaseUrl?: string;
}>;
export declare function buildFormDisplay(source: FormSourceProps): FormDisplay;
export type FormInteractiveIslandProps = InteractiveIslandProps<FormIslandMeta, 'form', typeof formBlockRuntime>;
export declare const formBlockRuntime: Readonly<{
    kind: "progressive";
    buildRender: (source: Readonly<{
        value?: FormRecord;
        siteId?: string;
        apiBaseUrl?: string;
        submitLabel?: string;
        successMessage?: string | null;
        className?: string;
        spamProtectionEnabled?: boolean;
    }>) => Readonly<{
        display: Readonly<{
            kind: "form";
            state: "missing" | "ready";
            className: string | null;
            formId: string | null;
            submitLabel: string;
            successMessage: string | null;
            form: FormRecord | null;
            groups: readonly FormFieldGroup[];
        }>;
        hydration: Readonly<{
            spamProtectionEnabled?: boolean;
        }>;
    }>;
    contracts: Readonly<{
        source: Readonly<{
            encode: (value: Readonly<{
                value?: FormRecord;
                siteId?: string;
                apiBaseUrl?: string;
                submitLabel?: string;
                successMessage?: string | null;
                className?: string;
                spamProtectionEnabled?: boolean;
            }>) => unknown;
            decode: (input: unknown) => import("../../../contracts").DecodeResult<Readonly<{
                value?: FormRecord;
                siteId?: string;
                apiBaseUrl?: string;
                submitLabel?: string;
                successMessage?: string | null;
                className?: string;
                spamProtectionEnabled?: boolean;
            }>>;
        }>;
        render: Readonly<{
            encode: (value: Readonly<{
                display: Readonly<{
                    kind: "form";
                    state: "missing" | "ready";
                    className: string | null;
                    formId: string | null;
                    submitLabel: string;
                    successMessage: string | null;
                    form: FormRecord | null;
                    groups: readonly FormFieldGroup[];
                }>;
                hydration: Readonly<{
                    spamProtectionEnabled?: boolean;
                }>;
            }>) => unknown;
            decode: (input: unknown) => import("../../../contracts").DecodeResult<Readonly<{
                display: Readonly<{
                    kind: "form";
                    state: "missing" | "ready";
                    className: string | null;
                    formId: string | null;
                    submitLabel: string;
                    successMessage: string | null;
                    form: FormRecord | null;
                    groups: readonly FormFieldGroup[];
                }>;
                hydration: Readonly<{
                    spamProtectionEnabled?: boolean;
                }>;
            }>>;
        }>;
    }>;
}>;
export declare const formInteractiveIslandPropsCodec: Readonly<{
    encode: (value: Readonly<Readonly<{
        siteId?: string;
        apiBaseUrl?: string;
    }> & {
        renderKind: "progressive";
        render: Readonly<{
            mode: "form";
        } & Readonly<{
            display: Readonly<{
                kind: "form";
                state: "missing" | "ready";
                className: string | null;
                formId: string | null;
                submitLabel: string;
                successMessage: string | null;
                form: FormRecord | null;
                groups: readonly FormFieldGroup[];
            }>;
            hydration: Readonly<{
                spamProtectionEnabled?: boolean;
            }>;
        }>>;
    }>) => unknown;
    decode: (input: unknown) => import("../../../contracts").DecodeResult<Readonly<Readonly<{
        siteId?: string;
        apiBaseUrl?: string;
    }> & {
        renderKind: "progressive";
        render: Readonly<{
            mode: "form";
        } & Readonly<{
            display: Readonly<{
                kind: "form";
                state: "missing" | "ready";
                className: string | null;
                formId: string | null;
                submitLabel: string;
                successMessage: string | null;
                form: FormRecord | null;
                groups: readonly FormFieldGroup[];
            }>;
            hydration: Readonly<{
                spamProtectionEnabled?: boolean;
            }>;
        }>>;
    }>>;
}>;
export declare function buildFormInteractiveIslandProps(props: FormSourceProps): FormInteractiveIslandProps;
export {};
