"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExecuteAssertUrlToolDefinition = exports.executeAssertUrlResponseSchema = exports.executeAssertUrlArgumentsSchema = void 0;
var zod_1 = require("zod");
var toolDefinition_js_1 = require("../toolDefinition.js");
exports.executeAssertUrlArgumentsSchema = zod_1.z.object({
    urlProperty: zod_1.z
        .enum(['href', 'pathname', 'hostname', 'host', 'port', 'search', 'hash', 'protocol', 'username', 'password'])
        .meta({
        description: 'The URL property to assert on. Use "pathname" when unsure which property to check. Common choices: "pathname" for path-only checks (e.g., /dashboard), "hostname" for domain checks, "href" for full URL, "search" for query parameters, "hash" for fragment identifiers, "port" for port number, "username" and "password" for URL credentials.',
    }),
    expectedValue: zod_1.z.string().meta({
        description: 'The expected value for the URL property. Use {{@variable_name}} syntax if the expected value is stored in a variable.',
    }),
    comparisonType: zod_1.z.enum(['equals', 'contains', 'starts_with', 'does_not_equal', 'does_not_contain']).meta({
        description: 'How to compare the URL property value against the expected value. Prefer "contains" or "starts_with" over "equals" when the full value may vary between runs.',
    }),
    conditionalType: zod_1.z.enum(['IF', 'ELSEIF']).optional().meta({
        description: "When set, records this assertion as a conditional branch instead of a plain assertion. Use 'IF' to open a new conditional block (first condition only). Use 'ELSEIF' for every subsequent branch condition within the same block (after IF or another ELSEIF).",
    }),
});
exports.executeAssertUrlResponseSchema = zod_1.z.object({
    success: zod_1.z.boolean(),
    message: zod_1.z.string().optional(),
});
exports.ExecuteAssertUrlToolDefinition = (0, toolDefinition_js_1.defineTool)({
    name: 'execute_assert_url',
    description: 'Asserts on a property of the current page URL. Use this to verify navigation outcomes, such as confirming the browser navigated to the correct page after a click or form submission. Specify which URL property to check (pathname, hostname, href, etc.), the expected value, and the comparison type. Use {{@variable_name}} syntax in expectedValue if the expected value is stored in a variable. To open a conditional block instead of asserting, set conditionalType="IF" (first condition in a block) or conditionalType="ELSEIF" (subsequent branch).',
    argumentsSchema: exports.executeAssertUrlArgumentsSchema,
    responseSchema: exports.executeAssertUrlResponseSchema,
});
//# sourceMappingURL=ExecuteAssertUrlDefinition.js.map