

import { __decorateMetadata } from "../../../../_virtual/_@oxc-project_runtime@0.95.0/helpers/decorateMetadata.mjs";
import { __decorate } from "../../../../_virtual/_@oxc-project_runtime@0.95.0/helpers/decorate.mjs";
import { IsUri } from "../../../../utils/validators.mjs";
import "../../../../utils/index.mjs";
import { DidDocumentService } from "./DidDocumentService.mjs";
import { DidCommV2Service, DidCommV2ServiceEndpoint } from "./DidCommV2Service.mjs";
import { IsOptional, IsString } from "class-validator";

//#region src/modules/dids/domain/service/LegacyDidCommV2Service.ts
var LegacyDidCommV2Service = class LegacyDidCommV2Service extends DidDocumentService {
	constructor(options) {
		super({
			...options,
			type: LegacyDidCommV2Service.type
		});
		if (options) {
			this.serviceEndpoint = options.serviceEndpoint;
			this.accept = options.accept;
			this.routingKeys = options.routingKeys;
		}
	}
	toNewDidCommV2() {
		return new DidCommV2Service({
			id: this.id,
			serviceEndpoint: new DidCommV2ServiceEndpoint({
				uri: this.serviceEndpoint,
				accept: this.accept,
				routingKeys: this.routingKeys
			})
		});
	}
};
LegacyDidCommV2Service.type = "DIDComm";
__decorate([
	IsString({ each: true }),
	IsOptional(),
	__decorateMetadata("design:type", Array)
], LegacyDidCommV2Service.prototype, "routingKeys", void 0);
__decorate([
	IsString({ each: true }),
	IsOptional(),
	__decorateMetadata("design:type", Array)
], LegacyDidCommV2Service.prototype, "accept", void 0);
__decorate([
	IsUri(),
	IsString(),
	__decorateMetadata("design:type", String)
], LegacyDidCommV2Service.prototype, "serviceEndpoint", void 0);

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