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 { MessageTypeRegExp } from "../../BaseDidCommMessage.mjs";
import { replaceLegacyDidSovPrefix } from "../../util/messageType.mjs";
import { Expose, Transform } from "class-transformer";
import { IsString, Matches } from "class-validator";

//#region ../didcomm/src/decorators/signature/SignatureDecorator.ts
/**
* Represents `[field]~sig` decorator
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0234-signature-decorator/README.md
*/
var SignatureDecorator = class {
	constructor(options) {
		if (options) {
			this.signatureType = options.signatureType;
			this.signatureData = options.signatureData;
			this.signer = options.signer;
			this.signature = options.signature;
		}
	}
};
__decorate([
	Expose({ name: "@type" }),
	Transform(({ value }) => replaceLegacyDidSovPrefix(value), { toClassOnly: true }),
	Matches(MessageTypeRegExp),
	__decorateMetadata("design:type", String)
], SignatureDecorator.prototype, "signatureType", void 0);
__decorate([
	Expose({ name: "sig_data" }),
	IsString(),
	__decorateMetadata("design:type", String)
], SignatureDecorator.prototype, "signatureData", void 0);
__decorate([
	Expose({ name: "signer" }),
	IsString(),
	__decorateMetadata("design:type", String)
], SignatureDecorator.prototype, "signer", void 0);
__decorate([
	Expose({ name: "signature" }),
	IsString(),
	__decorateMetadata("design:type", String)
], SignatureDecorator.prototype, "signature", void 0);

//#endregion
export { SignatureDecorator };
//# sourceMappingURL=SignatureDecorator.mjs.map