

const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.js');
const require_CredoError = require('../../../error/CredoError.js');
require('../../../error/index.js');
require('../../../plugins/index.js');
const require_decorateMetadata = require('../../../_virtual/_@oxc-project_runtime@0.97.0/helpers/decorateMetadata.js');
const require_decorate = require('../../../_virtual/_@oxc-project_runtime@0.97.0/helpers/decorate.js');
const require_PublicJwk = require('../../kms/jwk/PublicJwk.js');
const require_decorateParam = require('../../../_virtual/_@oxc-project_runtime@0.97.0/helpers/decorateParam.js');
const require_jsonld_signatures = require('./libraries/jsonld-signatures.js');
let tsyringe = require("tsyringe");

//#region src/modules/vc/data-integrity/SignatureSuiteRegistry.ts
var _ref;
require_jsonld_signatures.suites.LinkedDataSignature;
const SignatureSuiteToken = Symbol("SignatureSuiteToken");
let SignatureSuiteRegistry = class SignatureSuiteRegistry$1 {
	constructor(suites$1) {
		this.suiteMapping = suites$1.filter((suite) => suite !== "default");
	}
	get supportedProofTypes() {
		return this.suiteMapping.map((x) => x.proofType);
	}
	/**
	* @deprecated recommended to always search by key type instead as that will have broader support
	*/
	getByVerificationMethodType(verificationMethodType) {
		return this.suiteMapping.find((x) => x.verificationMethodTypes.includes(verificationMethodType));
	}
	getAllByPublicJwkType(publicJwkType) {
		const publicJwkClass = publicJwkType instanceof require_PublicJwk.PublicJwk ? publicJwkType.JwkClass : publicJwkType;
		return this.suiteMapping.filter((x) => x.supportedPublicJwkTypes.includes(publicJwkClass));
	}
	getByProofType(proofType) {
		const suiteInfo = this.suiteMapping.find((x) => x.proofType === proofType);
		if (!suiteInfo) throw new require_CredoError.CredoError(`No signature suite for proof type: ${proofType}`);
		return suiteInfo;
	}
	getVerificationMethodTypesByProofType(proofType) {
		const suiteInfo = this.suiteMapping.find((suiteInfo$1) => suiteInfo$1.proofType === proofType);
		if (!suiteInfo) throw new require_CredoError.CredoError(`No verification method type found for proof type: ${proofType}`);
		return suiteInfo.verificationMethodTypes;
	}
};
SignatureSuiteRegistry = require_decorate.__decorate([
	(0, tsyringe.injectable)(),
	require_decorateParam.__decorateParam(0, (0, tsyringe.injectAll)(SignatureSuiteToken)),
	require_decorateMetadata.__decorateMetadata("design:paramtypes", [typeof (_ref = typeof Array !== "undefined" && Array) === "function" ? _ref : Object])
], SignatureSuiteRegistry);

//#endregion
Object.defineProperty(exports, 'SignatureSuiteRegistry', {
  enumerable: true,
  get: function () {
    return SignatureSuiteRegistry;
  }
});
exports.SignatureSuiteToken = SignatureSuiteToken;