"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.releaseStepSchema = exports.clickAndHoldStepSchema = exports.hoverStepSchema = exports.rightClickStepSchema = exports.doubleClickStepSchema = exports.clickStepSchema = void 0;
const zod_1 = require("zod");
const shared_1 = require("./shared");
exports.clickStepSchema = shared_1.stepWithBrowserFindSchema.describe('Click on a browser element');
exports.doubleClickStepSchema = shared_1.stepWithBrowserFindSchema.describe('Double-click on a browser element');
exports.rightClickStepSchema = shared_1.stepWithBrowserFindSchema.describe('Right-click (context menu) on a browser element');
exports.hoverStepSchema = shared_1.stepWithBrowserFindSchema.describe('Hover the mouse over a browser element');
exports.clickAndHoldStepSchema = shared_1.stepWithBrowserFindSchema
    .extend({
    isHtml5: zod_1.z
        .boolean()
        .optional()
        .describe('Use HTML5 drag-and-drop API instead of mouse events'),
})
    .describe('Click and hold on an element for drag-and-drop');
const releaseArgsSchema = zod_1.z.union([
    zod_1.z.object({ isHtml5: zod_1.z.literal(true) }),
    zod_1.z.object({ isHtml5: zod_1.z.literal(false), steps: zod_1.z.number().optional() }),
    zod_1.z.object({ isHtml5: zod_1.z.boolean().optional(), steps: zod_1.z.number().optional() }),
]);
exports.releaseStepSchema = shared_1.stepWithBrowserFindSchema
    .extend({
    releaseArgs: releaseArgsSchema.optional(),
})
    .describe('Release a held click to complete a drag-and-drop');
