/**
 * Upload storage helpers for HazoDataForm
 *
 * Follows the same convention as hazo_data_forms:
 * - Uploads stored at `${field_id}__uploads` in form_data
 * - UploadedFile[] array per field
 */
/**
 * Get the form_data key where uploads are stored for a field.
 */
export function get_uploads_key(field_id) {
    return `${field_id}__uploads`;
}
/**
 * Extract uploads from form_data for a given field.
 */
export function get_field_uploads(form_data, field_id) {
    const key = get_uploads_key(field_id);
    const value = form_data[key];
    if (Array.isArray(value))
        return value;
    return [];
}
/**
 * Check if a field has any uploads.
 */
export function has_field_uploads(form_data, field_id) {
    return get_field_uploads(form_data, field_id).length > 0;
}
/**
 * Generate a unique file ID.
 */
export function generate_file_id() {
    return `${Date.now()}-${Math.random().toString(36).substring(2, 11)}`;
}
//# sourceMappingURL=data_form_uploads.js.map