/**
 * Field formatting utils for Components.
 *
 * @experimental
 * @internal
 */
import type FieldInfo from "../../popup/FieldInfo.js";
import type { FieldFormatUnion } from "../../layers/support/types.js";

/**
 * Returns a field format object for a given [FieldInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/FieldInfo/) and optional field definition.
 *
 * @param fieldInfo - The [FieldInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/FieldInfo/) describing the field.
 * @param field - The field definition, if available.
 * @returns The field format object, or `null` if not applicable.
 * @experimental
 * @internal
 */
export function fieldFormatFromFieldInfo(fieldInfo: FieldInfo, field?: any | null | undefined): FieldFormatUnion | null | undefined;