import * as react_jsx_runtime from 'react/jsx-runtime'; import * as react from 'react'; import { PropsWithChildren } from 'react'; import { Collection, InferSchemaOutput, InferSchemaInput, SyncMode } from '@tanstack/db'; import { CollectionUtils } from '@firtoz/db-helpers'; import { SelectSchema, GetTableFromSchema, IdOf, InsertSchema, InferCollectionFromTable } from '@firtoz/drizzle-utils'; import { Migration } from '../function-migrator.js'; import { IDBDatabaseLike, IDBCreator } from '../idb-types.js'; import '@firtoz/idb-collections'; type IndexedDbCollection, TTableName extends keyof TSchema & string> = Collection>>, IdOf>, CollectionUtils>>>, SelectSchema>, InferSchemaInput>>>; type DrizzleIndexedDBContextValue> = { indexedDB: IDBDatabaseLike | null; getCollection: (tableName: TTableName) => IndexedDbCollection; incrementRefCount: (tableName: string) => void; decrementRefCount: (tableName: string) => void; }; declare const DrizzleIndexedDBContext: react.Context | null>; type DrizzleIndexedDBProviderProps> = PropsWithChildren<{ dbName: string; schema: TSchema; migrations?: Migration[]; migrateFunction?: (dbName: string, migrations: Migration[], debug?: boolean, dbCreator?: IDBCreator) => Promise; debug?: boolean; syncMode?: SyncMode; /** * Optional custom database creator for testing/mocking. * Use createInstrumentedDbCreator() to track IndexedDB operations. */ dbCreator?: IDBCreator; }>; declare function DrizzleIndexedDBProvider>({ children, dbName, schema, migrations, migrateFunction, debug, syncMode, dbCreator, }: DrizzleIndexedDBProviderProps): react_jsx_runtime.JSX.Element; declare function useIndexedDBCollection, TTableName extends keyof TSchema & string>(context: DrizzleIndexedDBContextValue, tableName: TTableName): InferCollectionFromTable>; export { DrizzleIndexedDBContext, type DrizzleIndexedDBContextValue, DrizzleIndexedDBProvider, type IndexedDbCollection, useIndexedDBCollection };