import { type SetStoreFunction } from 'solid-js/store';
import { type Change, type Entry, type Format, type Input, type Output, type Query, type Schema, type TTL } from '../../zero-client/src/mod.js';
import type { ReadonlyJSONValue } from '../../shared/src/json.ts';
import type { ErroredQuery } from '../../zero-protocol/src/custom-queries.ts';
export type QueryResultDetails = Readonly<{
    type: 'complete';
} | {
    type: 'unknown';
} | QueryErrorDetails>;
type QueryErrorDetails = {
    type: 'error';
    refetch: () => void;
    error: {
        type: 'app';
        queryName: string;
        details: ReadonlyJSONValue;
    } | {
        type: 'http';
        queryName: string;
        status: number;
        details: ReadonlyJSONValue;
    };
};
export type State = [Entry, QueryResultDetails];
export declare const COMPLETE: QueryResultDetails;
export declare const UNKNOWN: QueryResultDetails;
export declare class SolidView implements Output {
    #private;
    constructor(input: Input, onTransactionCommit: (cb: () => void) => void, format: Format, onDestroy: () => void, queryComplete: true | ErroredQuery | Promise<true>, updateTTL: (ttl: TTL) => void, setState: SetStoreFunction<State>, refetch: () => void);
    destroy(): void;
    push(change: Change): void;
    updateTTL(ttl: TTL): void;
}
export declare function createSolidViewFactory(setState: SetStoreFunction<State>, refetch?: () => void): <TSchema extends Schema, TTable extends keyof TSchema["tables"] & string, TReturn>(_query: Query<TSchema, TTable, TReturn>, input: Input, format: Format, onDestroy: () => void, onTransactionCommit: (cb: () => void) => void, queryComplete: true | ErroredQuery | Promise<true>, updateTTL: (ttl: TTL) => void) => SolidView;
export {};
//# sourceMappingURL=solid-view.d.ts.map