"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.useQueryExportConversationsQueryResultsMutation = useQueryExportConversationsQueryResultsMutation;
exports.mutationKeyQueryExportConversationsQueryResults = mutationKeyQueryExportConversationsQueryResults;
exports.buildQueryExportConversationsQueryResultsMutation = buildQueryExportConversationsQueryResultsMutation;
const react_query_1 = require("@tanstack/react-query");
const queryExportConversationsQueryResults_js_1 = require("../funcs/queryExportConversationsQueryResults.js");
const primitives_js_1 = require("../lib/primitives.js");
const fp_js_1 = require("../types/fp.js");
const _context_js_1 = require("./_context.js");
/**
 * Export Conversations Query Results
 */
function useQueryExportConversationsQueryResultsMutation(options) {
    const client = (0, _context_js_1.useInkeepAnalyticsContext)();
    return (0, react_query_1.useMutation)({
        ...buildQueryExportConversationsQueryResultsMutation(client, options),
        ...options,
    });
}
function mutationKeyQueryExportConversationsQueryResults() {
    return [
        "@inkeep/inkeep-analytics",
        "Query",
        "exportConversationsQueryResults",
    ];
}
function buildQueryExportConversationsQueryResultsMutation(client$, hookOptions) {
    return {
        mutationKey: mutationKeyQueryExportConversationsQueryResults(),
        mutationFn: function queryExportConversationsQueryResultsMutationFn({ 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, queryExportConversationsQueryResults_js_1.queryExportConversationsQueryResults)(client$, request, mergedOptions));
        },
    };
}
//# sourceMappingURL=queryExportConversationsQueryResults.js.map