@hhgtech/hhg-components
Version:
Hello Health Group common components
22 lines (21 loc) • 982 B
TypeScript
import { Dispatch } from 'react';
import { LocaleType, GPSType } from "../../../../interfaces/types";
import { Action, ReducerState } from "./reducer";
import { TypeSearch } from "./types";
type UseSearchBarApiParams = {
dispatch: Dispatch<Action>;
careApiDomain: string;
locale?: LocaleType;
client?: string;
};
export declare const ignoreCacarSpecialty: (specialties: any[]) => any[];
export default function useSearchBarApi({ dispatch, careApiDomain, locale, client, }: UseSearchBarApiParams): {
fetchCitiesByLocation: ({ coordinates }: {
coordinates?: GPSType;
}) => Promise<void>;
fetchCitiesByKeyword: (keyword: string) => Promise<void>;
fetchSearchResults: (searchKeywords: string, state: ReducerState, searchType: TypeSearch, clientSlug?: string, cacheResult?: boolean) => Promise<void>;
fetchAllSpecialties: () => Promise<void>;
fetchPopularKeys: (searchType: TypeSearch) => Promise<void>;
};
export {};