import { compare, record, state } from '@synnaxlabs/x'; import { FrameProps } from './Frame'; /** Return value for {@link useStaticData}. Spread it into a {@link Frame}. */ export interface UseStaticDataReturn | undefined = record.Keyed | undefined> extends Required, "getItem">> { data: K[]; retrieve: state.Setter>; } /** Query the caller passes to `retrieve` to narrow the data. */ export interface RetrieveParams { searchTerm?: string; offset?: number; limit?: number; } export interface UseStaticDataParams = record.Keyed> { data: readonly E[]; /** Drops any item this rejects, before search and sort. */ filter?: (item: E, params: RetrieveParams) => boolean; sort?: compare.Comparator; } /** * Backs a {@link Frame} with an in-memory array, adding fuzzy search over every field * of the entry. * * @example */ export declare const useStaticData: = record.Keyed>({ data, filter, sort, }: UseStaticDataParams) => UseStaticDataReturn; //# sourceMappingURL=useStaticData.d.ts.map