import { createApiClient } from "../../common/api/client.js";
import { printResultToConsole } from "../../common/output.js";
export async function update(argv) {
    const { account, project } = argv;
    const client = createApiClient({ authToken: argv.authToken });
    const variable = await client.patch(`/v1/accounts/${account}/projects/${project}/branches/${encodeURIComponent(argv["branch"])}/variables/${encodeURIComponent(argv["name"])}`, {
        operation: "Failed to update variable",
        errorMessage: "Error: Failed to update variable. Check the arguments.",
        body: {
            value: argv["value"],
        },
    });
    printResultToConsole(`${variable.name} updated successfully`);
}
//# sourceMappingURL=handler.js.map