import type { UseQueryOptions } from '@tanstack/react-query'; import type { FilterPayload, RaRecord, SortPayload } from "../../types.js"; import type { ChoicesContextValue } from "../../form/index.js"; /** * Prepare data for the ReferenceArrayInput components * * @example * * const { allChoices, availableChoices, selectedChoices, error, isFetching, isLoading, isPending } = useReferenceArrayInputController({ * record: { referenceIds: ['id1', 'id2']}; * reference: 'reference'; * resource: 'resource'; * source: 'referenceIds'; * }); * * @param {Object} props * @param {Object} props.record The current resource record * @param {string} props.reference The linked resource name * @param {string} props.resource The current resource name * @param {string} props.source The key of the linked resource identifier * * @param {Props} props * * @return {Object} controllerProps Fetched data and callbacks for the ReferenceArrayInput components */ export declare const useReferenceArrayInputController: (props: UseReferenceArrayInputParams) => ChoicesContextValue; export interface UseReferenceArrayInputParams { debounce?: number; filter?: FilterPayload; queryOptions?: Omit, 'queryFn' | 'queryKey'> & { meta?: any; }; page?: number; perPage?: number; record?: RecordType; reference: string; resource?: string; sort?: SortPayload; source: string; enableGetChoices?: (filters: any) => boolean; } //# sourceMappingURL=useReferenceArrayInputController.d.ts.map