/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import { useMutation, } from "@tanstack/react-query";
import { queryQuerySemanticThreads } from "../funcs/queryQuerySemanticThreads.js";
import { combineSignals } from "../lib/primitives.js";
import { unwrapAsync } from "../types/fp.js";
import { useInkeepAnalyticsContext } from "./_context.js";
/**
 * Query Semantic Threads
 */
export function useQueryQuerySemanticThreadsMutation(options) {
    const client = useInkeepAnalyticsContext();
    return useMutation({
        ...buildQueryQuerySemanticThreadsMutation(client, options),
        ...options,
    });
}
export function mutationKeyQueryQuerySemanticThreads() {
    return ["@inkeep/inkeep-analytics", "Query", "querySemanticThreads"];
}
export function buildQueryQuerySemanticThreadsMutation(client$, hookOptions) {
    return {
        mutationKey: mutationKeyQueryQuerySemanticThreads(),
        mutationFn: function queryQuerySemanticThreadsMutationFn({ request, options, }) {
            const mergedOptions = {
                ...hookOptions,
                ...options,
                fetchOptions: {
                    ...hookOptions?.fetchOptions,
                    ...options?.fetchOptions,
                    signal: combineSignals(hookOptions?.fetchOptions?.signal, options?.fetchOptions?.signal),
                },
            };
            return unwrapAsync(queryQuerySemanticThreads(client$, request, mergedOptions));
        },
    };
}
//# sourceMappingURL=queryQuerySemanticThreads.js.map