import { __decorateMetadata } from "../../../../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
import { __decorate } from "../../../../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
import { IsValidMessageType, parseMessageType } from "../../../../../util/messageType.mjs";
import { DidCommMessage } from "../../../../../DidCommMessage.mjs";
import { Expose, Type } from "class-transformer";
import { IsInstance, IsOptional, IsString } from "class-validator";

//#region ../didcomm/src/modules/discover-features/protocol/v1/messages/DidCommFeaturesDiscloseMessage.ts
var DidCommFeaturesDiscloseProtocol = class {
	constructor(options) {
		if (options) {
			this.protocolId = options.protocolId;
			this.roles = options.roles;
		}
	}
};
__decorate([
	Expose({ name: "pid" }),
	IsString(),
	__decorateMetadata("design:type", String)
], DidCommFeaturesDiscloseProtocol.prototype, "protocolId", void 0);
__decorate([
	IsString({ each: true }),
	IsOptional(),
	__decorateMetadata("design:type", Array)
], DidCommFeaturesDiscloseProtocol.prototype, "roles", void 0);
var DidCommFeaturesDiscloseMessage = class DidCommFeaturesDiscloseMessage extends DidCommMessage {
	constructor(options) {
		super();
		this.type = DidCommFeaturesDiscloseMessage.type.messageTypeUri;
		if (options) {
			this.id = options.id ?? this.generateId();
			this.protocols = options.protocols.map((p) => new DidCommFeaturesDiscloseProtocol(p));
			this.setThread({ threadId: options.threadId });
		}
	}
};
DidCommFeaturesDiscloseMessage.type = parseMessageType("https://didcomm.org/discover-features/1.0/disclose");
__decorate([IsValidMessageType(DidCommFeaturesDiscloseMessage.type), __decorateMetadata("design:type", Object)], DidCommFeaturesDiscloseMessage.prototype, "type", void 0);
__decorate([
	IsInstance(DidCommFeaturesDiscloseProtocol, { each: true }),
	Type(() => DidCommFeaturesDiscloseProtocol),
	__decorateMetadata("design:type", Array)
], DidCommFeaturesDiscloseMessage.prototype, "protocols", void 0);

//#endregion
export { DidCommFeaturesDiscloseMessage, DidCommFeaturesDiscloseProtocol };
//# sourceMappingURL=DidCommFeaturesDiscloseMessage.mjs.map