import { u as useQuery } from './shared/apollo-composable.fosNkS3P.cjs';
export { A as ApolloClients, D as DefaultApolloClient, R as RenameKey, p as provideApolloClient, a as provideApolloClients, b as useApolloClient, c as useFragment, d as useGlobalMutationLoading, e as useGlobalQueryLoading, f as useGlobalSubscriptionLoading, g as useMutationLoading, h as useQueryLoading, i as useSubscriptionLoading } from './shared/apollo-composable.fosNkS3P.cjs';
import { OperationVariables, MaybeMasked, DocumentNode, TypedDocumentNode, ApolloClient, ErrorPolicy, DefaultContext, MutationFetchPolicy, ErrorLike, FetchPolicy } from '@apollo/client';
import { MaybeRefOrGetter, Ref } from '@vue/reactivity';
import { ApolloCache } from '@apollo/client/cache';
import { EventHookOn } from '@vueuse/core';
import '@apollo/client/masking';

declare namespace useLazyQuery {
    export type { useQuery };
    /** Options for useLazyQuery - same as useQuery but `enabled` is not applicable. */
    export type Options<TData = unknown, TVariables extends OperationVariables = OperationVariables> = Omit<useQuery.Options<TData, TVariables>, 'enabled'>;
    /** Options when query is disabled. */
    export type DisabledOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> = Omit<useQuery.DisabledOptions<TData, TVariables>, 'enabled'>;
    /** Result returned by useLazyQuery - extends useQuery.Result with `load` function. */
    export interface Result<TData = unknown, TVariables extends OperationVariables = OperationVariables> extends useQuery.Result<TData, TVariables> {
        /**
         * Load the query. Starts the query if not already started.
         *
         * Unlike `useQuery`, which executes immediately, `useLazyQuery` waits until
         * `load()` is called. After loading, the query behaves like a normal `useQuery`.
         *
         * @param variables - Optional variables to use for this load. If provided,
         *                    these will be merged with any variables from options.
         * @returns Promise resolving to the query result data when complete.
         *
         * @example
         * ```ts
         * const { load, result, loading } = useLazyQuery(GetUser)
         *
         * // Query doesn't execute until load() is called
         * async function fetchUser(id: string) {
         *   const data = await load({ id })
         *   console.log('User loaded:', data)
         * }
         * ```
         *
         * @group 4. Lifecycle
         */
        load: (variables?: TVariables) => Promise<MaybeMasked<TData> | undefined>;
    }
    export namespace DocumentationTypes {
        /** @group Composables Namespaces */
        namespace useLazyQuery {
            /** {@inheritDoc @vue/apollo-composable!useLazyQuery.Options:type} */
            interface Options extends Omit<useQuery.DocumentationTypes.useQuery.Options, 'enabled'> {
            }
            /** {@inheritDoc @vue/apollo-composable!useLazyQuery.Result:interface} */
            interface Result extends useQuery.DocumentationTypes.useQuery.Result {
                /** {@inheritDoc @vue/apollo-composable!useLazyQuery.Result#load:member} */
                load: (variables?: OperationVariables) => Promise<object | undefined>;
            }
        }
        /** {@inheritDoc @vue/apollo-composable!useLazyQuery:function(1)} */
        function useLazyQuery(query: MaybeRefOrGetter<DocumentNode>, options?: MaybeRefOrGetter<useLazyQuery.Options>): useLazyQuery.Result;
    }
}
/**
 * A composable for executing GraphQL queries lazily (on demand).
 *
 * Unlike `useQuery`, which executes immediately, `useLazyQuery` waits until
 * `load()` is called. This is useful for queries that should only run in
 * response to user actions (e.g., search, form submission).
 *
 * @param query - A GraphQL document.
 * @param options - Options to control how the query is executed.
 * @returns Query result object with reactive refs and `load` function.
 *
 * @group Composables
 *
 * @example
 * ```vue
 * <script setup lang="ts">
 * import { useLazyQuery } from '@vue/apollo-composable'
 * import gql from 'graphql-tag'
 *
 * const SearchUsers = gql`query SearchUsers($term: String!) { users(search: $term) { id name } }`
 *
 * const { load, result, loading } = useLazyQuery(SearchUsers)
 *
 * async function search(term: string) {
 *   const data = await load({ term })
 *   console.log('Found users:', data?.users)
 * }
 * </script>
 *
 * <template>
 *   <input @keyup.enter="search($event.target.value)" />
 *   <div v-if="loading">Searching...</div>
 *   <ul v-else-if="result">
 *     <li v-for="user in result.users" :key="user.id">{{ user.name }}</li>
 *   </ul>
 * </template>
 * ```
 */
declare function useLazyQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: MaybeRefOrGetter<DocumentNode | TypedDocumentNode<TData, TVariables>>, options?: MaybeRefOrGetter<useLazyQuery.Options<TData, TVariables>>): useLazyQuery.Result<TData, TVariables>;

declare namespace useMutation {
    import _self = useMutation;
    /**
     * Type for the `variables` option parameter: either a ref/getter of the full variables object,
     * or an object mapping individual variable names to refs/getters.
     *
     * @example
     * ```ts
     * // Single ref/getter for all variables
     * const variables = reactive({ text: 'Hello' })
     * useMutation(mutation, { variables })
     *
     * // Object mapping individual variable names to refs/getters
     * const text = ref('Hello')
     * useMutation(mutation, { variables: { text } })
     * ```
     */
    type ReactiveVariablesParameter<TVariables extends OperationVariables> = MaybeRefOrGetter<TVariables> | {
        [Key in keyof TVariables]: MaybeRefOrGetter<TVariables[Key]>;
    };
    namespace Base {
        /** Options for useMutation. */
        interface Options<TData = unknown, TVariables extends OperationVariables = OperationVariables> {
            /**
             * By providing either an object or a callback function that, when invoked after
             * a mutation, allows you to return optimistic data and optionally skip updates
             * via the `IGNORE` sentinel object, Apollo Client caches this temporary
             * (and potentially incorrect) response until the mutation completes, enabling
             * more responsive UI updates.
             *
             * @group 1. Operation options
             */
            optimisticResponse?: ApolloClient.MutateOptions<TData, TVariables>['optimisticResponse'];
            /**
             * A `MutationQueryReducersMap`, which is map from query names to
             * mutation query reducers. Briefly, this map defines how to incorporate the
             * results of the mutation into the results of queries that are currently
             * being watched by your application.
             *
             * @group 3. Caching options
             */
            updateQueries?: ApolloClient.MutateOptions<TData, TVariables>['updateQueries'];
            /**
             * An array (or a function that _returns_ an array) that specifies which queries
             * you want to refetch after the mutation occurs.
             *
             * Each array value can be either:
             *
             * - An object containing the `query` to execute, along with any `variables`
             *
             * - A string indicating the operation name of the query to refetch
             *
             * @group 3. Caching options
             */
            refetchQueries?: ApolloClient.MutateOptions<TData, TVariables>['refetchQueries'];
            /**
             * If `true`, makes sure all queries included in `refetchQueries` are completed
             * before the mutation is considered complete.
             *
             * @default false
             * @group 3. Caching options
             */
            awaitRefetchQueries?: ApolloClient.MutateOptions<TData, TVariables>['awaitRefetchQueries'];
            /**
             * A function used to update the Apollo Client cache after the mutation completes.
             *
             * @group 3. Caching options
             */
            update?: ApolloClient.MutateOptions<TData, TVariables>['update'];
            /**
             * Optional callback for intercepting queries whose cache data has been updated
             * by the mutation, as well as any queries specified in the `refetchQueries: [...]`
             * list passed to `client.mutate`.
             *
             * Returning a `Promise` from `onQueryUpdated` will cause the final mutation
             * `Promise` to await the returned `Promise`. Returning `false` causes the
             * query to be ignored.
             *
             * @group 3. Caching options
             */
            onQueryUpdated?: ApolloClient.MutateOptions<TData, TVariables>['onQueryUpdated'];
            /**
             * Specifies how the mutation handles a response that returns both GraphQL errors
             * and partial results.
             *
             * The default value is `none`, meaning that the mutation result includes error
             * details but _not_ partial results.
             *
             * @group 1. Operation options
             */
            errorPolicy?: ErrorPolicy;
            /**
             * An object containing all of the GraphQL variables your mutation requires to execute.
             *
             * Each key in the object corresponds to a variable name, and that key's value corresponds to the variable value.
             *
             * Supports reactive variables - provide a ref, getter, or object with reactive properties.
             *
             * @group 1. Operation options
             */
            variables?: ReactiveVariablesParameter<TVariables>;
            /**
             * If you're using [Apollo Link](https://www.apollographql.com/docs/react/api/link/introduction/), this object is the initial value of the `context` object that's passed along your link chain.
             *
             * @group 2. Networking options
             */
            context?: DefaultContext;
            /**
             * Provide `no-cache` if the mutation's result should _not_ be written to the
             * Apollo Client cache.
             *
             * The default value is `network-only` (which means the result _is_ written to the cache).
             *
             * @group 3. Caching options
             */
            fetchPolicy?: MutationFetchPolicy;
            /**
             * If `true`, keeps ROOT_MUTATION fields in the cache after mutation completes.
             * By default, Apollo Client clears these to avoid retaining sensitive data.
             *
             * @group 3. Caching options
             */
            keepRootFields?: ApolloClient.MutateOptions<TData, TVariables>['keepRootFields'];
            /**
             * ID of a named Apollo client to use instead of the default.
             *
             * @group 4. Vue-Apollo
             */
            clientId?: string;
            /**
             * Controls error throwing behavior.
             *
             * - `'auto'` (default): Throws if no `onError` handler is registered
             *
             * - `'always'`: Always throws errors
             *
             * - `'never'`: Never throws errors
             *
             * @default 'auto'
             * @group 4. Vue-Apollo
             */
            throws?: 'auto' | 'always' | 'never';
        }
        /** Result returned by useMutation. */
        interface Result<TData = unknown, TVariables extends OperationVariables = OperationVariables> {
            /**
             * Call the mutation with optional variables and override options.
             *
             * @param options - Variables and options for this mutation call.
             * @returns Promise resolving to the mutation result.
             *
             * @example
             * ```ts
             * const { mutate } = useMutation(AddTodo)
             *
             * // Call with variables
             * const result = await mutate({ variables: { text: 'New todo' } })
             *
             * // With optimistic response
             * await mutate({
             *   variables: { text: 'New todo' },
             *   optimisticResponse: {
             *     addTodo: { __typename: 'Todo', id: 'temp', text: 'New todo', completed: false }
             *   }
             * })
             * ```
             *
             * @group 1. Mutation
             */
            mutate: _self.MutateFunction<TData, TVariables>;
            /**
             * The data returned from your mutation. Can be `undefined` if `errorPolicy`
             * is `all` or `ignore` and the server returns a GraphQL response with `errors`
             * but not `data`, or a network error is returned.
             *
             * @group 2. Operation data
             */
            result: Readonly<Ref<MaybeMasked<TData> | null | undefined>>;
            /**
             * If the mutation produces one or more errors, this object contains either an
             * array of `graphQLErrors` or a single `networkError`. Otherwise, this value
             * is `undefined`.
             *
             * @group 2. Operation data
             */
            error: Readonly<Ref<ErrorLike | undefined>>;
            /**
             * If `true`, the mutation is currently in flight.
             *
             * @group 3. Network info
             */
            loading: Readonly<Ref<boolean>>;
            /**
             * If `true`, the mutation's mutate function has been called.
             *
             * @group 3. Network info
             */
            called: Readonly<Ref<boolean>>;
            /**
             * Reset the mutation's result to its initial, uncalled state.
             *
             * @group 4. Lifecycle
             */
            reset: () => void;
            /**
             * Event triggered when the mutation completes successfully.
             *
             * @group 5. Events
             */
            onDone: EventHookOn<ApolloClient.MutateResult<MaybeMasked<TData>>>;
            /**
             * Event triggered when the mutation encounters an error.
             *
             * @group 5. Events
             */
            onError: EventHookOn<ErrorLike>;
            /**
             * The GraphQL document being mutated.
             *
             * @group 6. Refs
             */
            document: Readonly<Ref<DocumentNode>>;
            /**
             * Current options.
             *
             * @group 6. Refs
             */
            options: Readonly<Ref<_self.Options<TData, TVariables> | undefined>>;
        }
    }
    /** Options for useMutation. */
    type Options<TData = unknown, TVariables extends OperationVariables = OperationVariables> = Base.Options<TData, TVariables>;
    /** Options when calling the mutate function. */
    type MutateOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> = Omit<Options<TData, TVariables>, 'clientId' | 'throws' | 'variables'> & {
        /**
         * Variables for this mutation call. Not reactive - pass plain values.
         *
         * @group 1. Operation options
         */
        variables?: TVariables;
        /**
         * Context can be a callback function that receives the composable-level context
         * and returns the final context value.
         *
         * @group 2. Networking options
         */
        context?: DefaultContext | ((composableContext: DefaultContext | undefined) => DefaultContext);
    };
    /** Type for mutate function that requires variables. */
    type MutateFunction<TData = unknown, TVariables extends OperationVariables = OperationVariables> = (options?: MutateOptions<TData, TVariables> & {
        variables?: TVariables;
    }) => Promise<ApolloClient.MutateResult<MaybeMasked<TData>>>;
    /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Result:interface} */
    interface Result<TData = unknown, TVariables extends OperationVariables = OperationVariables> extends Base.Result<TData, TVariables> {
    }
    namespace DocumentationTypes {
        /** @group Composables Namespaces */
        namespace useMutation {
            /** {@inheritDoc @vue/apollo-composable!useMutation.ReactiveVariablesParameter:type} */
            type ReactiveVariablesParameter = MaybeRefOrGetter<OperationVariables> | Record<string, MaybeRefOrGetter<any>>;
            /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Options:interface} */
            interface Options {
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Options#optimisticResponse:member} */
                optimisticResponse?: object | ((vars: object) => object);
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Options#updateQueries:member} */
                updateQueries?: Record<string, (prev: object, options: {
                    mutationResult: object;
                }) => object>;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Options#refetchQueries:member} */
                refetchQueries?: Array<string | {
                    query: DocumentNode;
                    variables?: object;
                }> | ((result: object) => Array<string | {
                    query: DocumentNode;
                    variables?: object;
                }>);
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Options#awaitRefetchQueries:member} */
                awaitRefetchQueries?: boolean;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Options#update:member} */
                update?: (cache: ApolloCache, result: {
                    data?: object;
                }) => void;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Options#onQueryUpdated:member} */
                onQueryUpdated?: (observableQuery: object) => boolean | Promise<unknown>;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Options#errorPolicy:member} */
                errorPolicy?: ErrorPolicy;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Options#variables:member} */
                variables?: ReactiveVariablesParameter;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Options#context:member} */
                context?: DefaultContext;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Options#fetchPolicy:member} */
                fetchPolicy?: MutationFetchPolicy;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Options#keepRootFields:member} */
                keepRootFields?: boolean;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Options#clientId:member} */
                clientId?: string;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Options#throws:member} */
                throws?: 'auto' | 'always' | 'never';
            }
            /** Options when calling the mutate function. */
            interface MutateOptions extends Omit<Options, 'clientId' | 'throws' | 'variables'> {
                /**
                 * Variables for this mutation call.
                 *
                 * @group 1. Operation options
                 */
                variables?: OperationVariables;
                /**
                 * Context can be a callback or object.
                 *
                 * @group 2. Networking options
                 */
                context?: DefaultContext | ((composableContext: DefaultContext | undefined) => DefaultContext);
            }
            /** Mutation result returned from mutate(). */
            interface MutateResult {
                /** The mutation result data. */
                data: object | undefined;
                /** Error if mutation failed. */
                error?: ErrorLike;
                /** Custom extensions returned from the GraphQL server. */
                extensions?: Record<string, unknown>;
            }
            /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Result:interface} */
            interface Result {
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Result#mutate:member} */
                mutate: (options?: MutateOptions) => Promise<MutateResult>;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Result#result:member} */
                result: Ref<object | null | undefined>;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Result#error:member} */
                error: Ref<ErrorLike | undefined>;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Result#loading:member} */
                loading: Ref<boolean>;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Result#called:member} */
                called: Ref<boolean>;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Result#reset:member} */
                reset: () => void;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Result#onDone:member} */
                onDone: EventHookOn<MutateResult>;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Result#onError:member} */
                onError: EventHookOn<ErrorLike>;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Result#document:member} */
                document: Ref<DocumentNode>;
                /** {@inheritDoc @vue/apollo-composable!useMutation.Base.Result#options:member} */
                options: Ref<Options | undefined>;
            }
        }
        /** {@inheritDoc @vue/apollo-composable!useMutation:function(1)} */
        function useMutation(mutation: MaybeRefOrGetter<DocumentNode>, options?: MaybeRefOrGetter<useMutation.Options>): useMutation.Result;
    }
}
/**
 * A composable for executing GraphQL mutations.
 *
 * @param mutation - A GraphQL mutation document.
 * @param options - Options to control how the mutation is executed.
 * @returns Mutation result object with reactive refs and mutate function.
 *
 * @group Composables
 *
 * @example
 * ```vue
 * <script setup lang="ts">
 * import { useMutation } from '@vue/apollo-composable'
 * import gql from 'graphql-tag'
 *
 * const AddTodo = gql`mutation AddTodo($text: String!) { addTodo(text: $text) { id text } }`
 *
 * const { mutate, loading, error, onDone, onError } = useMutation(AddTodo)
 *
 * onDone((result) => {
 *   console.log('Todo added:', result.data)
 * })
 *
 * onError((error) => {
 *   console.error('Failed:', error.message)
 * })
 *
 * async function addTodo(text: string) {
 *   await mutate({ variables: { text } })
 * }
 * </script>
 *
 * <template>
 *   <button @click="addTodo('New task')" :disabled="loading">
 *     {{ loading ? 'Adding...' : 'Add Todo' }}
 *   </button>
 *   <p v-if="error">Error: {{ error.message }}</p>
 * </template>
 * ```
 */
declare function useMutation<TData = unknown, TVariables extends OperationVariables = OperationVariables>(mutation: MaybeRefOrGetter<DocumentNode | TypedDocumentNode<TData, TVariables>>, options?: MaybeRefOrGetter<useMutation.Options<TData, TVariables>>): useMutation.Result<TData, TVariables>;

declare namespace useSubscription {
    import _self = useSubscription;
    /**
     * Type for the `variables` option parameter: either a ref/getter of the full variables object,
     * or an object mapping individual variable names to refs/getters.
     */
    type ReactiveVariablesParameter<TVariables extends OperationVariables> = MaybeRefOrGetter<TVariables> | {
        [Key in keyof TVariables]: MaybeRefOrGetter<TVariables[Key]>;
    };
    /** Makes `variables` required only when TVariables has required properties. */
    type ReactiveVariablesOption<TVariables extends OperationVariables> = {} extends TVariables ? {
        variables?: ReactiveVariablesParameter<TVariables>;
    } : {
        variables: ReactiveVariablesParameter<TVariables>;
    };
    namespace Base {
        /** Options for useSubscription. */
        interface Options<TData = unknown, TVariables extends OperationVariables = OperationVariables> {
            /**
             * How you want your component to interact with the Apollo cache.
             *
             * @group 3. Caching options
             */
            fetchPolicy?: FetchPolicy;
            /**
             * Specifies the `ErrorPolicy` to be used for this operation.
             *
             * @group 1. Operation options
             */
            errorPolicy?: ErrorPolicy;
            /**
             * Shared context between your component and your network interface (Apollo Link).
             *
             * @group 2. Networking options
             */
            context?: DefaultContext;
            /**
             * Extensions to be passed to the subscription.
             *
             * @group 2. Networking options
             */
            extensions?: Record<string, unknown>;
            /**
             * Determines if your subscription should be unsubscribed and subscribed again
             * when an input to the composable (such as `subscription` or `variables`) changes.
             *
             * @default true
             * @group 4. Vue-Apollo
             */
            shouldResubscribe?: boolean | ((options: _self.Options<TData, TVariables>) => boolean);
            /**
             * ID of a named Apollo client to use instead of the default.
             *
             * @group 4. Vue-Apollo
             */
            clientId?: string;
            /**
             * Reactive flag to enable/disable the subscription.
             *
             * @group 4. Vue-Apollo
             */
            enabled?: MaybeRefOrGetter<boolean>;
            /**
             * Throttle variable updates (ms).
             *
             * @group 4. Vue-Apollo
             */
            throttle?: number;
            /**
             * Debounce variable updates (ms).
             *
             * @group 4. Vue-Apollo
             */
            debounce?: number;
        }
        /** Result returned by useSubscription. */
        interface Result<TData = unknown, TVariables extends OperationVariables = OperationVariables> {
            /**
             * An object containing the result of your GraphQL subscription.
             * Defaults to `undefined`.
             *
             * @group 1. Operation data
             */
            result: Readonly<Ref<MaybeMasked<TData> | undefined>>;
            /**
             * A runtime error with `graphQLErrors` and `networkError` properties.
             *
             * @group 1. Operation data
             */
            error: Readonly<Ref<ErrorLike | undefined>>;
            /**
             * A boolean that indicates whether any initial data has been returned.
             * `true` until the first subscription event is received.
             *
             * @group 2. Network info
             */
            loading: Readonly<Ref<boolean>>;
            /**
             * Start the subscription. Has no effect if already active or `enabled` is false.
             *
             * @group 3. Lifecycle
             */
            start: () => void;
            /**
             * Stop the subscription. Can be restarted by calling {@link start}.
             *
             * @group 3. Lifecycle
             */
            stop: () => void;
            /**
             * Disconnect and reconnect the subscription.
             *
             * @group 3. Lifecycle
             */
            restart: () => Promise<void>;
            /**
             * Event triggered when subscription data is received.
             *
             * @group 4. Events
             */
            onResult: EventHookOn<MaybeMasked<TData>>;
            /**
             * Event triggered when a subscription error occurs.
             *
             * @group 4. Events
             */
            onError: EventHookOn<ErrorLike>;
            /**
             * Event triggered when the subscription completes.
             *
             * @group 4. Events
             */
            onComplete: EventHookOn<void>;
            /**
             * The GraphQL document being subscribed to.
             *
             * @group 5. Refs
             */
            document: Readonly<Ref<DocumentNode>>;
            /**
             * Current variables being sent to the subscription (after debounce/throttle).
             *
             * @group 5. Refs
             */
            variables: Readonly<Ref<TVariables>>;
            /**
             * Current options.
             *
             * @group 5. Refs
             */
            options: Readonly<Ref<_self.Options<TData, TVariables> | undefined>>;
        }
    }
    type Options<TData = unknown, TVariables extends OperationVariables = OperationVariables> = Base.Options<TData, TVariables> & ReactiveVariablesOption<TVariables>;
    /** Options when subscription is explicitly disabled. Variables are optional. */
    type DisabledOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> = Base.Options<TData, TVariables> & {
        enabled: MaybeRefOrGetter<false>;
        variables?: ReactiveVariablesParameter<TVariables>;
    };
    /** Options that can reactively switch between enabled and disabled. */
    type MaybeDisabledOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables> = Options<TData, TVariables> | DisabledOptions<TData, TVariables>;
    /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Result:interface} */
    interface Result<TData = unknown, TVariables extends OperationVariables = OperationVariables> extends Base.Result<TData, TVariables> {
    }
    namespace DocumentationTypes {
        /** @group Composables Namespaces */
        namespace useSubscription {
            /** {@inheritDoc @vue/apollo-composable!useSubscription.ReactiveVariablesParameter:type} */
            type ReactiveVariablesParameter = MaybeRefOrGetter<OperationVariables> | Record<string, MaybeRefOrGetter<unknown>>;
            /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Options:interface} */
            interface Options {
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Options#fetchPolicy:member} */
                fetchPolicy?: FetchPolicy;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Options#errorPolicy:member} */
                errorPolicy?: ErrorPolicy;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Options#context:member} */
                context?: DefaultContext;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Options#extensions:member} */
                extensions?: Record<string, unknown>;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Options#shouldResubscribe:member} */
                shouldResubscribe?: boolean | ((options: Options) => boolean);
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Options#clientId:member} */
                clientId?: string;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Options#enabled:member} */
                enabled?: MaybeRefOrGetter<boolean>;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Options#throttle:member} */
                throttle?: number;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Options#debounce:member} */
                debounce?: number;
                /**
                 * An object containing all of the GraphQL variables your subscription requires to execute.
                 *
                 * @group 1. Operation options
                 */
                variables?: ReactiveVariablesParameter;
            }
            /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Result:interface} */
            interface Result {
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Result#result:member} */
                result: Ref<object | undefined>;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Result#error:member} */
                error: Ref<ErrorLike | undefined>;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Result#loading:member} */
                loading: Ref<boolean>;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Result#start:member} */
                start: () => void;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Result#stop:member} */
                stop: () => void;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Result#restart:member} */
                restart: () => Promise<void>;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Result#onResult:member} */
                onResult: EventHookOn<object>;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Result#onError:member} */
                onError: EventHookOn<ErrorLike>;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Result#onComplete:member} */
                onComplete: EventHookOn<void>;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Result#document:member} */
                document: Ref<DocumentNode>;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Result#variables:member} */
                variables: Ref<OperationVariables>;
                /** {@inheritDoc @vue/apollo-composable!useSubscription.Base.Result#options:member} */
                options: Ref<Options | undefined>;
            }
        }
        /** {@inheritDoc @vue/apollo-composable!useSubscription:function(1)} */
        function useSubscription(subscription: MaybeRefOrGetter<DocumentNode>, options?: MaybeRefOrGetter<useSubscription.Options>): useSubscription.Result;
    }
}
/**
 * A composable for executing GraphQL subscriptions with full reactivity.
 *
 * @param subscription - A GraphQL subscription document.
 * @param options - Options to control how the subscription is executed.
 * @returns Subscription result object with reactive refs.
 *
 * @group Composables
 *
 * @example
 * ```vue
 * <script setup lang="ts">
 * import { useSubscription } from '@vue/apollo-composable'
 * import gql from 'graphql-tag'
 *
 * const OnMessage = gql`subscription OnMessage($channelId: ID!) {
 *   newMessage(channelId: $channelId) { id text author }
 * }`
 *
 * const { result, error, onResult, onError } = useSubscription(OnMessage, {
 *   variables: { channelId: '1' }
 * })
 *
 * onResult((data) => {
 *   console.log('New message:', data)
 * })
 *
 * onError((error) => {
 *   console.error('Subscription error:', error.message)
 * })
 * </script>
 *
 * <template>
 *   <div v-if="error">
 *     Error: {{ error.message }}
 *   </div>
 *   <div v-else>
 *     Last result: {{ result }}
 *   </div>
 * </template>
 * ```
 */
declare function useSubscription<TData = unknown, TVariables extends OperationVariables = OperationVariables>(subscription: MaybeRefOrGetter<DocumentNode | TypedDocumentNode<TData, TVariables>>, options?: MaybeRefOrGetter<useSubscription.MaybeDisabledOptions<TData, TVariables>>): useSubscription.Result<TData, TVariables>;

export { useLazyQuery, useMutation, useQuery, useSubscription };
