import { LookupColumnDef } from '@object-ui/types'; export interface DeriveColumnsOptions { /** Primary display field — always the leading column. */ displayField: string; /** Maximum number of columns to derive (including the display field). */ max?: number; } interface ObjectSchemaLike { fields?: Record; /** * ADR-0085 semantic role: the object's most important fields. The single * source for "how to list this object" — shared with the detail-page related * list — so a lookup picker and a related list of the same object agree on * columns with zero per-surface config. */ highlightFields?: unknown; /** Object-level "fields to display in search result cards" (legacy spec metadata). */ displayFields?: unknown; } /** * Derive sensible Record Picker columns from a referenced object's schema when * a lookup field declares no explicit `lookup_columns`. * * Priority: * 1. The referenced object's ADR-0085 `highlightFields` — the canonical * "how to list this object" set, shared with the detail-page related list. * 2. Else the object's legacy `displayFields` search-card shape. * 3. Otherwise the display field plus the next few business fields in * declaration order, skipping system/audit fields and heavy non-tabular * types. * * The result gives every lookup a multi-column, disambiguating picker with zero * field-level configuration. Column `type` is carried through so the picker can * render currency / select / date cells via the shared cell renderer. * * Returns an empty array when no usable schema is available, in which case the * caller should fall back to the single display-field column. */ export declare function deriveLookupColumns(objectSchema: ObjectSchemaLike | null | undefined, { displayField, max }: DeriveColumnsOptions): LookupColumnDef[]; export {};