import { Synnax as Client } from '@synnaxlabs/client';
import { observe, Primitive } from '@synnaxlabs/x';
import { z } from 'zod';
import { ContextValue, OnChangeProps, UseProps, UseReturn } from './Form';
interface QueryFnProps {
    client: Client;
}
interface ApplyObservableProps<Z extends z.ZodTypeAny, O = Z> {
    changes: O;
    ctx: ContextValue<Z>;
}
interface SyncLocalProps<Z extends z.ZodTypeAny> extends OnChangeProps<Z> {
    client: Client;
}
interface UseSyncedProps<Z extends z.ZodTypeAny, O = Z> extends UseProps<Z> {
    name: string;
    key: Primitive[];
    queryFn: (props: QueryFnProps) => Promise<z.output<Z>>;
    openObservable?: (client: Client) => Promise<observe.ObservableAsyncCloseable<O>>;
    applyObservable?: (props: ApplyObservableProps<Z, O>) => void;
    applyChanges?: (props: SyncLocalProps<Z>) => Promise<void>;
}
export declare const useSynced: <Z extends z.ZodTypeAny, O = Z>({ key, name, queryFn, values: initialValues, openObservable, applyChanges, applyObservable, ...props }: UseSyncedProps<Z, O>) => UseReturn<Z>;
export {};
//# sourceMappingURL=synced.d.ts.map