import { type HttpError, type UseSelectProps, type UseSelectReturnType, type BaseRecord } from "@refinedev/core"; import type { AutocompleteProps } from "@mui/material/Autocomplete"; export type UseAutocompleteProps = Pick, "resource"> & Omit, "optionLabel" | "optionValue">; type AutocompletePropsType = Required, "options" | "loading" | "onInputChange" | "filterOptions">>; export type UseAutocompleteReturnType = Omit, "options"> & { autocompleteProps: AutocompletePropsType; }; /** * `useAutocomplete` hook is used to fetch data from the dataProvider and return the options for the select box. * * It uses `getList` method as query function from the dataProvider that is * passed to {@link https://refine.dev/docs/api-reference/core/components/refine-config ``}. * * @see {@link https://refine.dev/docs/api-reference/mui/hooks/useAutocomplete/} for more details. * * @typeParam TQueryFnData - Result data returned by the query function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`} * @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#httperror `HttpError`} * @typeParam TData - Result data returned by the `select` function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}. Defaults to `TQueryFnData` * */ export declare const useAutocomplete: (props: UseAutocompleteProps) => UseAutocompleteReturnType; export {}; //# sourceMappingURL=index.d.ts.map