/**
 * Shared file extraction helpers for reading field-level files from form_data.
 * Used by summary_view, print_view, approval_view, and any other view that
 * reads files stored at __files_${field_id} / __private_files_${field_id}.
 */
/** Extract public files for a field from form_data (legacy FileData shape) */
export function get_field_files(form_data, field_id) {
    const files = form_data[`__files_${field_id}`];
    return Array.isArray(files) ? files : [];
}
/** Extract private files for a field from form_data (legacy FileData shape) */
export function get_field_private_files(form_data, field_id) {
    const files = form_data[`__private_files_${field_id}`];
    return Array.isArray(files) ? files : [];
}
/** Extract public attachments for a field from form_data (FormFileAttachment shape) */
export function get_field_attachments(form_data, field_id) {
    const files = form_data[`__files_${field_id}`];
    return Array.isArray(files) ? files : [];
}
/** Extract private attachments for a field from form_data (FormFileAttachment shape) */
export function get_field_private_attachments(form_data, field_id) {
    const files = form_data[`__private_files_${field_id}`];
    return Array.isArray(files) ? files : [];
}
//# sourceMappingURL=file_helpers.js.map