"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExecuteSetCookieToolDefinition = exports.executeSetCookieResponseSchema = exports.executeSetCookieArgumentsSchema = void 0;
var zod_1 = require("zod");
var toolDefinition_js_1 = require("../toolDefinition.js");
exports.executeSetCookieArgumentsSchema = zod_1.z.object({
    name: zod_1.z.string().meta({
        description: 'The name of the cookie to set.',
    }),
    value: zod_1.z.string().meta({
        description: 'The value to assign to the cookie.',
    }),
    domain: zod_1.z.string().optional().meta({
        description: 'The domain for which the cookie is valid (e.g., "example.com"). If omitted, the cookie applies to the current domain.',
    }),
    path: zod_1.z.string().optional().meta({
        description: 'The URL path for which the cookie is valid (e.g., "/"). If omitted, defaults to the current path.',
    }),
    secure: zod_1.z.boolean().optional().meta({
        description: 'Whether the cookie should only be transmitted over HTTPS.',
    }),
    httpOnly: zod_1.z.boolean().optional().meta({
        description: 'Whether the cookie should be inaccessible to JavaScript (HTTP-only). Use this for security-sensitive cookies.',
    }),
    sameSite: zod_1.z.enum(['Strict', 'Lax', 'None']).optional().meta({
        description: 'The SameSite attribute controlling cross-site cookie behavior. "Strict" blocks all cross-site requests, "Lax" allows top-level navigation, "None" allows all cross-site requests (requires Secure).',
    }),
    expires: zod_1.z.number().optional().meta({
        description: 'The cookie expiry time in seconds from now. If omitted, the cookie is a session cookie and will be cleared when the browser is closed.',
    }),
    url: zod_1.z.string().optional().meta({
        description: 'The URL to associate the cookie with. Use this to set cookies for a specific URL rather than the current page URL.',
    }),
});
exports.executeSetCookieResponseSchema = zod_1.z.object({
    success: zod_1.z.boolean(),
    message: zod_1.z.string().optional(),
});
exports.ExecuteSetCookieToolDefinition = (0, toolDefinition_js_1.defineTool)({
    name: 'execute_set_cookie',
    description: 'Sets a browser cookie with the specified name and value. Use this when the test needs to establish session state, set authentication tokens, or configure cookies before navigating to a page. Only name and value are required; all other options are optional.',
    argumentsSchema: exports.executeSetCookieArgumentsSchema,
    responseSchema: exports.executeSetCookieResponseSchema,
});
//# sourceMappingURL=ExecuteSetCookieDefinition.js.map