/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import { lessonsGetNextQuestion } from "../../funcs/lessonsGetNextQuestion.js";
import * as operations from "../../models/operations/index.js";
import { formatResult } from "../tools.js";
const args = {
    request: operations.GetNextQuestionRequest$inboundSchema,
};
export const tool$lessonsGetNextQuestion = {
    name: "lessons-get-next-question",
    description: `Get next question

Returns the next question in the given PowerPath component resource.

Works only with lessons of type 'powerpath-100'.

A 'Lesson' in this context is a ComponentResource object which has a Resource object associated with it.
`,
    args,
    tool: async (client, args, ctx) => {
        const [result, apiCall] = await lessonsGetNextQuestion(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        const value = result.value;
        return formatResult(value, apiCall);
    },
};
//# sourceMappingURL=lessonsGetNextQuestion.js.map