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