import { ReactNode } from "react"; import { Key } from "./indexed-db"; interface IndexedDBProps { name: string; version: number; children: ReactNode; objectStoresMeta: ObjectStoreMeta[]; } interface ObjectStoreMeta { store: string; storeConfig: { keyPath: string; autoIncrement: boolean; [key: string]: any; }; storeSchema: ObjectStoreSchema[]; } interface ObjectStoreSchema { name: string; keypath: string; options: { unique: boolean; [key: string]: any; }; } export declare function IndexedDB({ name, version, children, objectStoresMeta, }: IndexedDBProps): JSX.Element; interface AccessDBProps { children: ({ db, }: { db: IDBDatabase; add: (value: T, key?: any) => Promise; getByID: (id: number | string) => Promise; getAll: () => Promise; update: (value: T, key?: any) => Promise; deleteRecord: (key: Key) => Promise; openCursor: (cursorCallback: (event: Event) => void, keyRange?: IDBKeyRange) => Promise; getByIndex: (indexName: string, key: any) => Promise; clear: () => Promise; }) => ReactNode; objectStore: string; } export declare function AccessDB({ children, objectStore }: AccessDBProps): JSX.Element; export {};