"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.useQueryQueryFeedbackMutation = useQueryQueryFeedbackMutation;
exports.mutationKeyQueryQueryFeedback = mutationKeyQueryQueryFeedback;
exports.buildQueryQueryFeedbackMutation = buildQueryQueryFeedbackMutation;
const react_query_1 = require("@tanstack/react-query");
const queryQueryFeedback_js_1 = require("../funcs/queryQueryFeedback.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 Feedback
 */
function useQueryQueryFeedbackMutation(options) {
    const client = (0, _context_js_1.useInkeepAnalyticsContext)();
    return (0, react_query_1.useMutation)({
        ...buildQueryQueryFeedbackMutation(client, options),
        ...options,
    });
}
function mutationKeyQueryQueryFeedback() {
    return ["@inkeep/inkeep-analytics", "Query", "queryFeedback"];
}
function buildQueryQueryFeedbackMutation(client$, hookOptions) {
    return {
        mutationKey: mutationKeyQueryQueryFeedback(),
        mutationFn: function queryQueryFeedbackMutationFn({ 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, queryQueryFeedback_js_1.queryQueryFeedback)(client$, request, mergedOptions));
        },
    };
}
//# sourceMappingURL=queryQueryFeedback.js.map