/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import { useMutation, } from "@tanstack/react-query";
import { queryExportEventsQueryResults } from "../funcs/queryExportEventsQueryResults.js";
import { combineSignals } from "../lib/primitives.js";
import { unwrapAsync } from "../types/fp.js";
import { useInkeepAnalyticsContext } from "./_context.js";
/**
 * Export Events Query Results
 */
export function useQueryExportEventsQueryResultsMutation(options) {
    const client = useInkeepAnalyticsContext();
    return useMutation({
        ...buildQueryExportEventsQueryResultsMutation(client, options),
        ...options,
    });
}
export function mutationKeyQueryExportEventsQueryResults() {
    return ["@inkeep/inkeep-analytics", "Query", "exportEventsQueryResults"];
}
export function buildQueryExportEventsQueryResultsMutation(client$, hookOptions) {
    return {
        mutationKey: mutationKeyQueryExportEventsQueryResults(),
        mutationFn: function queryExportEventsQueryResultsMutationFn({ request, options, }) {
            const mergedOptions = {
                ...hookOptions,
                ...options,
                fetchOptions: {
                    ...hookOptions?.fetchOptions,
                    ...options?.fetchOptions,
                    signal: combineSignals(hookOptions?.fetchOptions?.signal, options?.fetchOptions?.signal),
                },
            };
            return unwrapAsync(queryExportEventsQueryResults(client$, request, mergedOptions));
        },
    };
}
//# sourceMappingURL=queryExportEventsQueryResults.js.map