

const require_KeyDidRegistrar = require('./methods/key/KeyDidRegistrar.js');
const require_KeyDidResolver = require('./methods/key/KeyDidResolver.js');
const require_PeerDidRegistrar = require('./methods/peer/PeerDidRegistrar.js');
const require_PeerDidResolver = require('./methods/peer/PeerDidResolver.js');
const require_WebDidResolver = require('./methods/web/WebDidResolver.js');
const require_JwkDidRegistrar = require('./methods/jwk/JwkDidRegistrar.js');
const require_JwkDidResolver = require('./methods/jwk/JwkDidResolver.js');
require('./methods/index.js');

//#region src/modules/dids/DidsModuleConfig.ts
var DidsModuleConfig = class {
	constructor(options) {
		this.options = options ?? {};
	}
	/** See {@link DidsModuleConfigOptions.registrars} */
	get registrars() {
		if (this._registrars) return this._registrars;
		let registrars = this.options.registrars ?? [
			new require_KeyDidRegistrar.KeyDidRegistrar(),
			new require_PeerDidRegistrar.PeerDidRegistrar(),
			new require_JwkDidRegistrar.JwkDidRegistrar()
		];
		if (!registrars.find((registrar) => registrar instanceof require_PeerDidRegistrar.PeerDidRegistrar)) registrars = [...registrars, new require_PeerDidRegistrar.PeerDidRegistrar()];
		if (!registrars.find((registrar) => registrar instanceof require_KeyDidRegistrar.KeyDidRegistrar)) registrars = [...registrars, new require_KeyDidRegistrar.KeyDidRegistrar()];
		this._registrars = registrars;
		return registrars;
	}
	addRegistrar(registrar) {
		this.registrars.push(registrar);
	}
	/** See {@link DidsModuleConfigOptions.resolvers} */
	get resolvers() {
		if (this._resolvers) return this._resolvers;
		let resolvers = this.options.resolvers ?? [
			new require_WebDidResolver.WebDidResolver(),
			new require_KeyDidResolver.KeyDidResolver(),
			new require_PeerDidResolver.PeerDidResolver(),
			new require_JwkDidResolver.JwkDidResolver()
		];
		if (!resolvers.find((resolver) => resolver instanceof require_PeerDidResolver.PeerDidResolver)) resolvers = [...resolvers, new require_PeerDidResolver.PeerDidResolver()];
		if (!resolvers.find((resolver) => resolver instanceof require_KeyDidResolver.KeyDidResolver)) resolvers = [...resolvers, new require_KeyDidResolver.KeyDidResolver()];
		this._resolvers = resolvers;
		return resolvers;
	}
	addResolver(resolver) {
		this.resolvers.push(resolver);
	}
};

//#endregion
exports.DidsModuleConfig = DidsModuleConfig;