"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.useQueryQuerySemanticThreadsMutation = useQueryQuerySemanticThreadsMutation;
exports.mutationKeyQueryQuerySemanticThreads = mutationKeyQueryQuerySemanticThreads;
exports.buildQueryQuerySemanticThreadsMutation = buildQueryQuerySemanticThreadsMutation;
const react_query_1 = require("@tanstack/react-query");
const queryQuerySemanticThreads_js_1 = require("../funcs/queryQuerySemanticThreads.js");
const primitives_js_1 = require("../lib/primitives.js");
const fp_js_1 = require("../types/fp.js");
const _context_js_1 = require("./_context.js");
/**
 * Query Semantic Threads
 */
function useQueryQuerySemanticThreadsMutation(options) {
    const client = (0, _context_js_1.useInkeepAnalyticsContext)();
    return (0, react_query_1.useMutation)({
        ...buildQueryQuerySemanticThreadsMutation(client, options),
        ...options,
    });
}
function mutationKeyQueryQuerySemanticThreads() {
    return ["@inkeep/inkeep-analytics", "Query", "querySemanticThreads"];
}
function buildQueryQuerySemanticThreadsMutation(client$, hookOptions) {
    return {
        mutationKey: mutationKeyQueryQuerySemanticThreads(),
        mutationFn: function queryQuerySemanticThreadsMutationFn({ request, options, }) {
            const mergedOptions = {
                ...hookOptions,
                ...options,
                fetchOptions: {
                    ...hookOptions?.fetchOptions,
                    ...options?.fetchOptions,
                    signal: (0, primitives_js_1.combineSignals)(hookOptions?.fetchOptions?.signal, options?.fetchOptions?.signal),
                },
            };
            return (0, fp_js_1.unwrapAsync)((0, queryQuerySemanticThreads_js_1.queryQuerySemanticThreads)(client$, request, mergedOptions));
        },
    };
}
//# sourceMappingURL=queryQuerySemanticThreads.js.map