import { type SubmitResponsePayload } from '@defra/forms-model';
import { type checkFormStatus } from '../../../../../server/plugins/engine/helpers.js';
import { type FormModel } from '../../../../../server/plugins/engine/models/index.js';
import { type DetailItem } from '../../../../../server/plugins/engine/models/types.js';
import { type FormContext, type RichFormValue } from '../../../../../server/plugins/engine/types.js';
/**
 * Payment data for the machine output format
 * Defined locally to avoid circular dependency with types.ts
 */
interface PaymentOutput {
    paymentId: string;
    reference: string;
    amount: number;
    description: string;
    createdAt: string;
}
export declare function format(context: FormContext, items: DetailItem[], model: FormModel, _submitResponse: SubmitResponsePayload, _formStatus: ReturnType<typeof checkFormStatus>): string;
/**
 * Categories the form submission data into the "main" body and "repeaters".
 *
 * {
 *    main: {
 *       componentName: 'componentValue',
 *    },
 *    repeaters: {
 *      repeaterName: [
 *        {
 *          textComponentName: 'componentValue'
 *        },
 *        {
 *          richComponentName: { foo: 'bar', 'baz': true }
 *        }
 *      ]
 *    },
 *    files: {
 *      fileComponentName: [
 *        {
 *          fileId: '123-456-789',
 *          fileName: 'example.pdf',
 *          userDownloadLink: 'https://forms-designer/file-download/123-456-789'
 *        }
 *      ]
 *    },
 *    payments: {
 *      paymentComponentName: {
 *        paymentId: 'abc123',
 *        reference: 'REF-123',
 *        amount: 10.00,
 *        description: 'Application fee',
 *        createdAt: '2025-01-23T10:30:00.000Z'
 *      }
 *    }
 * }
 */
export declare function categoriseData(items: DetailItem[]): {
    main: Record<string, RichFormValue>;
    repeaters: Record<string, Record<string, RichFormValue>[]>;
    files: Record<string, {
        fileId: string;
        fileName: string;
        userDownloadLink: string;
    }[]>;
    payment?: PaymentOutput;
};
export {};
