import { ReactNode, ReactElement } from 'react'; import { Record } from '../../types'; import { LinkToFunctionType } from './getResourceLinkPath'; import { UseReferenceProps } from '../useReference'; interface ChildrenParams extends UseReferenceProps { resourceLinkPath: string | false; } export interface ReferenceFieldControllerProps { basePath: string; children: (params: ChildrenParams) => ReactNode; record?: Record; reference: string; resource: string; source: string; link?: string | boolean | LinkToFunctionType; } /** * Fetch reference record, and delegate rendering to child component. * * The reference prop should be the name of one of the components * added as child. * * @example * * * * * By default, includes a link to the page of the related record * (`/users/:userId` in the previous example). * * Set the link prop to "show" to link to the page instead. * * @example * * * * * You can also prevent `` from adding link to children by setting * `link` to false. * * @example * * * */ export declare const ReferenceFieldController: (props: ReferenceFieldControllerProps) => ReactElement>; export default ReferenceFieldController;