

const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
const require_decorateMetadata = require('../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.js');
const require_decorate = require('../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.js');
const require_types = require('../../../../types.js');
let class_validator = require("class-validator");
class_validator = require_rolldown_runtime.__toESM(class_validator);

//#region src/modules/dids/domain/service/DidDocumentService.ts
var DidDocumentService = class {
	constructor(options) {
		if (options) {
			this.id = options.id;
			this.serviceEndpoint = options.serviceEndpoint;
			this.type = options.type;
		}
	}
};
require_decorate.__decorate([(0, class_validator.IsString)(), require_decorateMetadata.__decorateMetadata("design:type", String)], DidDocumentService.prototype, "id", void 0);
require_decorate.__decorate([IsStringOrJsonObjectSingleOrArray(), require_decorateMetadata.__decorateMetadata("design:type", Object)], DidDocumentService.prototype, "serviceEndpoint", void 0);
require_decorate.__decorate([(0, class_validator.IsString)(), require_decorateMetadata.__decorateMetadata("design:type", String)], DidDocumentService.prototype, "type", void 0);
/**
* Checks if a given value is a string, a json object, or an array of strings and json objects
*/
function IsStringOrJsonObjectSingleOrArray(validationOptions) {
	return (0, class_validator.ValidateBy)({
		name: "isStringOrJsonObjectSingleOrArray",
		validator: {
			validate: (value) => (0, class_validator.isString)(value) || require_types.isJsonObject(value) || Array.isArray(value) && value.every((v) => (0, class_validator.isString)(v) || require_types.isJsonObject(v)),
			defaultMessage: (0, class_validator.buildMessage)((eachPrefix) => `${eachPrefix}$property must be a string, JSON object, or an array consisting of strings and JSON objects`, validationOptions)
		}
	}, validationOptions);
}

//#endregion
exports.DidDocumentService = DidDocumentService;