import React, { ComponentType, HTMLProps } from 'react'; import { Path } from '@sanity/types'; import type { TemplatePermissionsResult } from '@sanity/base/_internal'; export interface TemplateOption { id: string; params?: Record; } /** * unstable * @internal */ export interface EditReferenceOptions { id: string; type: string; parentRefPath: Path; template: TemplateOption; } export interface EditReferenceLinkComponentProps { documentId: string; documentType: string; parentRefPath: Path; template?: TemplateOption; children: React.ReactNode; } /** * unstable * @internal */ export interface ReferenceInputOptions { /** * Represents the highlighted path if ths current document has a related open * child (e.g. reference in place). */ activePath?: { path: Path; state: 'selected' | 'pressed' | 'none'; }; /** * A specialized `EditReferenceLinkComponent` component that takes in the needed props to open a * referenced document to the right */ EditReferenceLinkComponent?: ComponentType, 'children'> & EditReferenceLinkComponentProps>; initialValueTemplateItems?: TemplatePermissionsResult[]; /** * Similar to `EditReferenceChildLink` expect without the wrapping component */ onEditReference?: (options: EditReferenceOptions) => void; } /** * unstable * @internal */ export declare function useReferenceInputOptions(): ReferenceInputOptions; /** * unstable * @internal */ export declare function ReferenceInputOptionsProvider(props: ReferenceInputOptions & { children: React.ReactNode; }): React.JSX.Element; //# sourceMappingURL=ReferenceInputOptions.d.ts.map