import * as preact from 'preact'; import { ComponentChildren } from 'preact'; import { D as Db$1 } from './index.d-C4smILHn.js'; import { Q as QueryResult, e as QueryTotals, I as InstaQLQuery, T as TxInput } from './tx.d-Cxg-Av3i.js'; import './ops.d-D9oT7Y5m.js'; declare function OdlaProvider$1({ db, children }: { db: Db$1; children: ComponentChildren; }): preact.JSX.Element; declare function useDb$1(): Db$1; interface UseQueryOptions { /** Keep showing the previous query's data (flagged `isStale`) while the new * query's first result is in flight, instead of flashing to null. */ keepPrevious?: boolean; } interface UseQueryResult$1 { data: QueryResult | null; isLoading: boolean; /** True while `data` belongs to a previous query shape (keepPrevious). */ isStale: boolean; /** * Per-namespace match counts, for query nodes that asked with `count: true` — * the total a pager needs, ignoring `limit`/`offset`. Recomputed with the rows * and delivered on the same frames, so it stays live instead of going stale * the moment anything changes. Undefined when nothing asked. */ totals?: QueryTotals; } declare function useQuery$1(query: InstaQLQuery, opts?: UseQueryOptions): UseQueryResult$1; declare function useTransact$1(): (input: TxInput, opts?: { mutationId?: string; }) => Promise; /** Context provider that owns one permission-governed realtime database client. */ declare const OdlaProvider: typeof OdlaProvider$1; /** Read the current realtime database client from `OdlaProvider`. */ declare const useDb: typeof useDb$1; /** Subscribe a component to a realtime query with data and loading state. */ declare const useQuery: typeof useQuery$1; /** Return a callback that applies optimistic transaction operations. */ declare const useTransact: typeof useTransact$1; /** Realtime database client supplied through `OdlaProvider`. */ type Db = Db$1; /** Reactive query result containing current data, loading state, and — for * nodes that asked with `count: true` — live per-namespace totals. */ type UseQueryResult = UseQueryResult$1; export { type Db, OdlaProvider, type UseQueryResult, useDb, useQuery, useTransact };