/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import { powerPathLessonPlansCreateLessonPlan } from "../../funcs/powerPathLessonPlansCreateLessonPlan.js";
import * as operations from "../../models/operations/index.js";
import { formatResult } from "../tools.js";
const args = {
    request: operations.CreateLessonPlanRequest$inboundSchema.optional(),
};
export const tool$powerPathLessonPlansCreateLessonPlan = {
    name: "power-path-lesson-plans-create-lesson-plan",
    description: `Create a lesson plan


    Creates a new lesson plan for a course and student.

    The lesson plan is created by specifying a course sourced ID and a student sourced ID and, optionally, a class sourced ID.
    The student must be enrolled in the class to create a lesson plan for them.

    If no class sourced ID is provided, the course's default class will be used if available.
    `,
    args,
    tool: async (client, args, ctx) => {
        const [result, apiCall] = await powerPathLessonPlansCreateLessonPlan(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=powerPathLessonPlansCreateLessonPlan.js.map