import { T as TextField } from './index-ec7dc2ad.js';

function findFieldNestedField(fields, fieldId) {
  if (fieldId.includes('.')) {
    const nestedFieldId = fieldId.split('.')[0];
    return fields.find(field => field.id === nestedFieldId);
  }
  return undefined;
}
function findField(fields, fieldId) {
  if (fieldId === 'fullName') {
    return new TextField('fullName', '');
  }
  return fields.find(field => field.id === fieldId) || findFieldNestedField(fields, fieldId);
}

export { findField as f };
