UNPKG

@openmrs/esm-styleguide

Version:
31 lines (30 loc) 972 B
import { type FetchResponse } from '@openmrs/esm-api'; import { type FHIRLocationResource } from '@openmrs/esm-emr-api'; export interface LocationResponse { type: string; total: number; resourceType: string; meta: { lastUpdated: string; }; link: Array<{ relation: string; url: string; }>; id: string; entry: Array<FHIRLocationResource>; } export interface LoginLocationData { locations: Array<FHIRLocationResource>; isLoading: boolean; totalResults?: number; hasMore: boolean; loadingNewData: boolean; setPage: (size: number | ((_size: number) => number)) => Promise<FetchResponse<LocationResponse>[] | undefined>; } export declare function useLocationByUuid(locationUuid?: string): { location: FHIRLocationResource | null; error: any; isLoading: boolean; }; export declare function useLocations(locationTag?: string, count?: number, searchQuery?: string): LoginLocationData;