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