"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Capture=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var _1=()=>{var tmp=require(".");return _1=()=>tmp,tmp},matcher_1=()=>{var tmp=require("./matcher");return matcher_1=()=>tmp,tmp},error_1=()=>{var tmp=require("./private/error");return error_1=()=>tmp,tmp},type_1=()=>{var tmp=require("./private/type");return type_1=()=>tmp,tmp};class Capture extends matcher_1().Matcher{pattern;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.assertions.Capture",version:"2.252.0"};name;_captured=[];idx=0;constructor(pattern){super(),this.pattern=pattern,this.name="Capture"}test(actual){const result=new(matcher_1()).MatchResult(actual);if(actual==null)return result.recordFailure({matcher:this,path:[],message:`Can only capture non-nullish values. Found ${actual}`});if(this.pattern!==void 0){const innerResult=(matcher_1().Matcher.isMatcher(this.pattern)?this.pattern:_1().Match.objectLike(this.pattern)).test(actual);if(innerResult.hasFailed())return innerResult}return result.recordCapture({capture:this,value:actual}),result}next(){return this.idx