import type { RefSchemaField } from './types';

export const getImageFieldId = (
  fields: Record<string, RefSchemaField | undefined> | undefined,
): string | undefined =>
  Object.entries(fields ?? {}).find(([, f]) => f?.type === 'IMAGE')?.[0];
