

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 { IsUri } from "../../../../utils/validators.mjs";
import "../../../../utils/index.mjs";
import { getProtocolScheme } from "../../../../utils/uri.mjs";
import { DidDocumentService } from "./DidDocumentService.mjs";
import { ArrayNotEmpty, IsOptional, IsString } from "class-validator";

//#region src/modules/dids/domain/service/DidCommV1Service.ts
var DidCommV1Service = class DidCommV1Service extends DidDocumentService {
	constructor(options) {
		super({
			...options,
			type: DidCommV1Service.type
		});
		this.priority = 0;
		if (options) {
			this.recipientKeys = options.recipientKeys;
			this.routingKeys = options.routingKeys;
			this.accept = options.accept;
			if (options.priority) this.priority = options.priority;
		}
	}
	get protocolScheme() {
		return getProtocolScheme(this.serviceEndpoint);
	}
};
DidCommV1Service.type = "did-communication";
__decorate([
	IsString(),
	IsUri(),
	__decorateMetadata("design:type", String)
], DidCommV1Service.prototype, "serviceEndpoint", void 0);
__decorate([
	ArrayNotEmpty(),
	IsString({ each: true }),
	__decorateMetadata("design:type", Array)
], DidCommV1Service.prototype, "recipientKeys", void 0);
__decorate([
	IsString({ each: true }),
	IsOptional(),
	__decorateMetadata("design:type", Array)
], DidCommV1Service.prototype, "routingKeys", void 0);
__decorate([
	IsString({ each: true }),
	IsOptional(),
	__decorateMetadata("design:type", Array)
], DidCommV1Service.prototype, "accept", void 0);

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