import { Location } from 'react-router-dom'; import { RaRecord } from '../types'; /** * A hook that returns the record to use to override the values in a form * @param options The hook options * @param options.searchSource The key in the location search to use as a source for the record. Its content should be a stringified JSON object. * @param options.stateSource The key in the location state to use as a source for the record * @returns The record to use to override the values in a form */ export declare const useRecordFromLocation: (props?: UseRecordFromLocationOptions) => Partial> | null; export type UseRecordFromLocationOptions = { searchSource?: string; stateSource?: string; }; /** * Get the initial record from the location, whether it comes from the location * state or is serialized in the url search part. */ export declare const getRecordFromLocation: ({ state, search }: Location, { searchSource, stateSource, }?: { searchSource?: string; stateSource?: string; }) => Partial | null; //# sourceMappingURL=useRecordFromLocation.d.ts.map