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