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