import type { AdminCollection } from "@rebasepro/cms-types"; /** * All properties that could serve as the entity title, best first. * * Candidates are ranked from the property *schema* — identifiers (primary * keys, foreign keys, UUID columns, user pickers), images and hidden fields are * excluded structurally, so a collection whose id column is called something * other than `id` is handled the same as one where it isn't. * * When the collection declares `propertiesOrder` the developer has already * stated what comes first, so qualifying candidates keep that order; otherwise * they are ranked (a name beats a description beats a relation). * * @group Collections */ export declare function getTitlePropertyCandidates>(collection: AdminCollection): string[]; /** * The relation a collection *leads* with, if it leads with one. * * A junction-shaped collection — a pipeline entry, a membership, a booking — * holds no label of its own: it is "this candidate, for that vacancy". The * general ranking puts relations last (they only read once the target * resolves), so the title slot would otherwise fall to whatever free text * happens to follow: a note, a comment. Preview surfaces that render one row * per entity (list, cards, board) prefer the leading relation instead. * * The decision is structural — the first property that could be a title, in the * order the developer declared (or ordered) them. Declaration order is a * statement about what the collection is about; property *names* are not * consulted here. * * Returns `undefined` when that first property is anything but a * single-cardinality relation, or when the collection states its own * `display.title`. * * @group Collections */ export declare function getLeadingRelationTitleKey>(collection: AdminCollection): string | undefined; /** * The property that should fill the title slot for a collection, ignoring any * concrete values. Prefer {@link getTitlePropertyKeyForValues} when an entity * is at hand — it can skip candidates that happen to be empty or to hold an id. * * @group Collections */ export declare function getTitlePropertyKey>(collection: AdminCollection): string | undefined; /** * True when a value reads as a machine identifier (UUID, ObjectId/long hex, * cuid) rather than as something worth showing to a person. * * @group Collections */ export declare function looksLikeIdentifierValue(value: unknown): boolean; /** * The title property for a concrete entity: the best-ranked candidate that * actually carries a readable value. Candidates that are empty, that repeat the * entity id, or that hold an opaque identifier are skipped, so a free-text * column that happens to store UUIDs never ends up as the title. * * Returns the top-ranked candidate when none of them has a usable value, so * callers can still render a placeholder for that property. * * @group Collections */ export declare function getTitlePropertyKeyForValues>(collection: AdminCollection, values: Record | undefined, entityId?: string | number): string | undefined;