/**
 * SPEC-15 cross-schema resolution helpers.
 * When the parent's codegen needs the FK property pointing back to it from a child module,
 * it loads the child schema on-demand. These helpers encapsulate the loading + lookup.
 */
import type { ModuleDefinitionSchema } from './model.js';
/**
 * Resolves the FK property name on the child pointing back to the parent.
 * Used by `widget.type: grid-elements-manager` dispatch to compute `parentFilter` and `parentDefaults`.
 *
 * Walks `aggregateProperties` in YAML order; returns the first property whose
 * `relationship.type === 'many-to-one'` AND `relationship.modulePath === parentModulePath`.
 * Throws if no such property exists.
 *
 * @param parentModulePath path of the parent module, format `<bc>/<mod>`.
 * @param childModulePath  path of the child module, format `<bc>/<mod>`.
 * @param cwd              working directory (defaults to `process.cwd()`).
 */
export declare function resolveChildFkField(parentModulePath: string, childModulePath: string, cwd?: string): string;
/**
 * Pure lookup over an already-loaded child schema. Exposed separately for
 * tests and for callers that have the schema in hand.
 */
export declare function findFkProperty(childSchema: ModuleDefinitionSchema, parentModulePath: string): string;
/**
 * Resolves a single display-field property name of a target aggregate.
 * Loads the target schema on-demand and returns a property identifier
 * suitable for FK accessor-key emission.
 *
 * Resolution rules (delegated to `getDisplayFieldFirstIdentifier`):
 *   - **Identifier-shape `displayField`** → returns the identifier directly.
 *   - **Template-shape `displayField`** (e.g. `'{code} - {name}'`) →
 *     returns the **first** identifier matched left-to-right in the
 *     template (`'code'`). The columns template emits a comment flagging
 *     the heuristic so a downstream maintainer can spot it.
 *   - **No valid placeholder in the template** (e.g. `'literal text'`,
 *     `'{}'`, `'{not.a.field}'`) → falls back to `'name'`.
 *   - **Default (unset)** → returns `'name'`.
 *
 * Used by the columns template's FK auto-include to emit the correct
 * `accessorKey: '<rel>.<targetDisplayField>'`.
 *
 * @param targetModulePath path of the target aggregate, format `<bc>/<mod>`.
 * @param cwd              working directory (defaults to `process.cwd()`).
 */
export declare function getTargetDisplayField(targetModulePath: string, cwd?: string): string;
/**
 * Resolves a target aggregate's `displayField` as a placeholder template
 * suitable for the `ToOptionsPipe` runtime pipe in the Aurora frontend lib.
 *
 * Resolution rules (delegated to `getDisplayFieldTemplate`):
 *   - **Identifier shape** (`'email'`) → returns `'{email}'`.
 *   - **Template shape** (`'{code} - {name}'`) → returns verbatim.
 *   - **Default (unset)** → returns `'{name}'`.
 *
 * Used by the search-select-family relationship partials to emit the pipe
 * argument in the form-component template. Sister to
 * `getTargetDisplayField`, which returns a single property identifier for
 * FK accessor-key emission.
 *
 * @param targetModulePath path of the target aggregate, format `<bc>/<mod>`.
 * @param cwd              working directory (defaults to `process.cwd()`).
 */
export declare function getTargetDisplayFieldTemplate(targetModulePath: string, cwd?: string): string;
