import { run } from './run'; import type { CombinedMutationLifecycle, MutationLifecycle } from './helpers/mutationLifecycle'; import type { ZeroEventsEmitter } from './types'; import type { ReactNode } from 'react'; type ControlQueriesProps = { children: ReactNode; action?: 'enable' | 'disable'; whenDisabled?: 'empty' | 'last-value'; }; type CombinableZeroClient = { instanceName: string; useQuery: (...args: any[]) => any; useQueryDirect: (...args: any[]) => any; usePermission: (...args: any[]) => any; usePermissionDirect: (...args: any[]) => any; zero: any; preload: (...args: any[]) => any; getQuery: (...args: any[]) => any; mutationLifecycle: MutationLifecycle; zeroEvents: ZeroEventsEmitter; reloadPage: () => boolean; retire: () => Promise; ControlQueries: (props: ControlQueriesProps) => ReactNode; }; export type CombineZeroClientsOptions = { inner?: string; }; type UnionToIntersection = (U extends any ? (x: U) => void : never) extends (x: infer I) => void ? I : never; type WithoutMutate = Zero extends unknown ? Omit : never; type MutationsOf = Zero extends { mutate: infer Mutations; } ? Mutations : never; type CombinedZero = UnionToIntersection> & { mutate: UnionToIntersection>; }; export type CombinedZeroClients = { useQuery: UnionToIntersection; usePermission: UnionToIntersection; zero: CombinedZero; preload: UnionToIntersection; getQuery: UnionToIntersection; run: typeof run; zeroEvents: ZeroEventsEmitter; reloadPage: () => boolean; retire: () => Promise; ControlQueries: (props: ControlQueriesProps) => ReactNode; } & CombinedMutationLifecycle; export declare function combineZeroClients(...clientsAndOptions: [...Clients] | [...Clients, CombineZeroClientsOptions]): CombinedZeroClients; export {}; //# sourceMappingURL=combineZeroClients.d.ts.map