import { MappedDocument } from "../gridView/gridView.mjs"; import { FolderSortKeys } from "payload"; import React from "react"; //#region src/components/gridContext/gridContext.d.ts interface OnItemClickArgs { event: React.MouseEvent; index: number; item: MappedDocument; } interface OnItemKeyPressArgs { event: React.KeyboardEvent; index: number; item: MappedDocument; } type GridContextValue = { docs?: MappedDocument[]; clearSelections: () => void; onItemClick: (args: OnItemClickArgs) => void; onItemKeyPress: (args: OnItemKeyPressArgs) => void; setFocusedItemIndex: React.Dispatch>; focusedItemIndex: number; }; type GridProviderProps = { readonly allowMultiSelection?: boolean; /** * Children to render inside the provider */ readonly children: React.ReactNode; /** * All documents in the current folder */ readonly docs: MappedDocument[]; /** * The intial search query */ readonly search?: string; /** * The sort order of the documents * * @example * `name` for descending * `-name` for ascending */ readonly sort?: FolderSortKeys; }; declare function GridProvider(props: GridProviderProps): React.JSX.Element; declare function useGrid(): GridContextValue; //#endregion export { GridContextValue, GridProvider, GridProviderProps, useGrid }; //# sourceMappingURL=gridContext.d.mts.map