"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var assertTool_exports = {};
__export(assertTool_exports, {
  assertMcpTool: () => assertMcpTool,
  assertToolSchema: () => assertToolSchema
});
module.exports = __toCommonJS(assertTool_exports);
var import_mcpBundle = require("playwright-core/lib/mcpBundle");
var import_tool = require("../sdk/tool");
const assertToolSchema = {
  name: "browser_assert",
  title: "Assert element state",
  description: [
    "Assert that an element has expected text, value, or is visible.",
    "Use this after key actions to verify the page state is correct.",
    "The assertion is recorded in the trace for test generation.",
    'Types: "text" checks element text content, "value" checks input field value.'
  ].join(" "),
  inputSchema: import_mcpBundle.z.object({
    type: import_mcpBundle.z.enum(["text", "value"]).describe('Type of assertion: "text" for text content, "value" for input field value'),
    ref: import_mcpBundle.z.string().describe("Element reference from the latest snapshot"),
    element: import_mcpBundle.z.string().describe("Human-readable description of the element being asserted"),
    expected: import_mcpBundle.z.string().describe("Expected text or value to assert"),
    substring: import_mcpBundle.z.boolean().optional().default(true).describe("For text assertions: match as substring (true) or exact match (false)")
  }),
  type: "readOnly"
};
function assertMcpTool() {
  return (0, import_tool.toMcpTool)(assertToolSchema);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  assertMcpTool,
  assertToolSchema
});
