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 { JsonTransformer, W3cCredential } from "@credo-ts/core";
import { Expose, Type } from "class-transformer";
import { ArrayNotEmpty, IsBoolean, IsEnum, IsOptional, IsString, ValidateNested } from "class-validator";

//#region ../didcomm/src/modules/credentials/formats/dataIntegrity/dataIntegrityExchange.ts
var _ref, _ref2, _ref3, _ref4;
const SUPPORTED_W3C_VC_DATA_MODEL_VERSIONS = ["1.1", "2.0"];
var AnonCredsLinkSecretBindingMethod = class {
	constructor(options) {
		if (options) {
			this.credentialDefinitionId = options.credentialDefinitionId;
			this.nonce = options.nonce;
			this.keyCorrectnessProof = options.keyCorrectnessProof;
		}
	}
};
__decorate([
	IsString(),
	Expose({ name: "cred_def_id" }),
	__decorateMetadata("design:type", String)
], AnonCredsLinkSecretBindingMethod.prototype, "credentialDefinitionId", void 0);
__decorate([IsString(), __decorateMetadata("design:type", String)], AnonCredsLinkSecretBindingMethod.prototype, "nonce", void 0);
__decorate([Expose({ name: "key_correctness_proof" }), __decorateMetadata("design:type", typeof (_ref = typeof Record !== "undefined" && Record) === "function" ? _ref : Object)], AnonCredsLinkSecretBindingMethod.prototype, "keyCorrectnessProof", void 0);
var DidCommSignedAttachmentBindingMethod = class {
	constructor(options) {
		if (options) {
			this.algsSupported = options.algSupported;
			this.didMethodsSupported = options.didMethodsSupported;
			this.nonce = options.nonce;
		}
	}
};
__decorate([
	IsString({ each: true }),
	Expose({ name: "algs_supported" }),
	__decorateMetadata("design:type", Array)
], DidCommSignedAttachmentBindingMethod.prototype, "algsSupported", void 0);
__decorate([
	IsString({ each: true }),
	Expose({ name: "did_methods_supported" }),
	__decorateMetadata("design:type", Array)
], DidCommSignedAttachmentBindingMethod.prototype, "didMethodsSupported", void 0);
__decorate([IsString(), __decorateMetadata("design:type", String)], DidCommSignedAttachmentBindingMethod.prototype, "nonce", void 0);
var DataIntegrityBindingMethods = class {
	constructor(options) {
		if (options) {
			this.anoncredsLinkSecret = options.anonCredsLinkSecret;
			this.didcommSignedAttachment = options.didcommSignedAttachment;
		}
	}
};
__decorate([
	IsOptional(),
	ValidateNested(),
	Type(() => AnonCredsLinkSecretBindingMethod),
	Expose({ name: "anoncreds_link_secret" }),
	__decorateMetadata("design:type", typeof (_ref2 = typeof AnonCredsLinkSecretBindingMethod !== "undefined" && AnonCredsLinkSecretBindingMethod) === "function" ? _ref2 : Object)
], DataIntegrityBindingMethods.prototype, "anoncredsLinkSecret", void 0);
__decorate([
	IsOptional(),
	ValidateNested(),
	Type(() => DidCommSignedAttachmentBindingMethod),
	Expose({ name: "didcomm_signed_attachment" }),
	__decorateMetadata("design:type", typeof (_ref3 = typeof DidCommSignedAttachmentBindingMethod !== "undefined" && DidCommSignedAttachmentBindingMethod) === "function" ? _ref3 : Object)
], DataIntegrityBindingMethods.prototype, "didcommSignedAttachment", void 0);
var DataIntegrityCredentialOffer = class {
	constructor(options) {
		if (options) {
			this.credential = options.credential instanceof W3cCredential ? JsonTransformer.toJSON(options.credential) : options.credential;
			this.bindingRequired = options.bindingRequired;
			this.bindingMethod = options.bindingMethod;
			this.dataModelVersionsSupported = options.dataModelVersionsSupported;
		}
	}
};
__decorate([
	ArrayNotEmpty(),
	IsEnum(SUPPORTED_W3C_VC_DATA_MODEL_VERSIONS, { each: true }),
	Expose({ name: "data_model_versions_supported" }),
	__decorateMetadata("design:type", Array)
], DataIntegrityCredentialOffer.prototype, "dataModelVersionsSupported", void 0);
__decorate([
	IsOptional(),
	IsBoolean(),
	Expose({ name: "binding_required" }),
	__decorateMetadata("design:type", Boolean)
], DataIntegrityCredentialOffer.prototype, "bindingRequired", void 0);
__decorate([
	IsOptional(),
	ValidateNested(),
	Type(() => DataIntegrityBindingMethods),
	Expose({ name: "binding_method" }),
	__decorateMetadata("design:type", typeof (_ref4 = typeof DataIntegrityBindingMethods !== "undefined" && DataIntegrityBindingMethods) === "function" ? _ref4 : Object)
], DataIntegrityCredentialOffer.prototype, "bindingMethod", void 0);
__decorate([Expose({ name: "credential" }), __decorateMetadata("design:type", Object)], DataIntegrityCredentialOffer.prototype, "credential", void 0);

//#endregion
export { AnonCredsLinkSecretBindingMethod, DataIntegrityBindingMethods, DataIntegrityCredentialOffer, DidCommSignedAttachmentBindingMethod };
//# sourceMappingURL=dataIntegrityExchange.mjs.map