import type { FormSubmitHandler } from './controller.js'; /** * Creates a {@linkcode FormSubmitHandler} that converts `FormData` into a JSON * object and POSTs it to `url`. * * The JSON body is `{ targetUrl, payload, formKey }` where `targetUrl` is the * form container's Submit URL (the `action`), `payload` holds the field values, * and `formKey` identifies the form. * * Typical use: point `url` at a same-origin route handler that forwards the * payload server-side, avoiding CORS issues with external webhooks. * * @param url - The endpoint to POST JSON to (e.g. `'/api/forms/submit'`). * @param formKey - Optional identifier for the form (e.g. the content key). */ export declare function createJsonSubmitHandler(url: string, formKey?: string): FormSubmitHandler;