const require_rolldown_runtime = require('../../../../../_virtual/rolldown_runtime.js');
const require_DidCommMessageRole = require('../../repository/DidCommMessageRole.js');
require('../../repository/index.js');
const require_DidCommCredentialState = require('../../modules/credentials/models/DidCommCredentialState.js');
require('../../modules/credentials/repository/DidCommCredentialExchangeRepository.js');
let __credo_ts_core = require("@credo-ts/core");
__credo_ts_core = require_rolldown_runtime.__toESM(__credo_ts_core);

//#region ../didcomm/src/updates/0.1-0.2/credential.ts
let V01_02MigrationCredentialRole = /* @__PURE__ */ function(V01_02MigrationCredentialRole$1) {
	V01_02MigrationCredentialRole$1[V01_02MigrationCredentialRole$1["Issuer"] = 0] = "Issuer";
	V01_02MigrationCredentialRole$1[V01_02MigrationCredentialRole$1["Holder"] = 1] = "Holder";
	return V01_02MigrationCredentialRole$1;
}({});
const holderCredentialStates = [
	require_DidCommCredentialState.DidCommCredentialState.Declined,
	require_DidCommCredentialState.DidCommCredentialState.ProposalSent,
	require_DidCommCredentialState.DidCommCredentialState.OfferReceived,
	require_DidCommCredentialState.DidCommCredentialState.RequestSent,
	require_DidCommCredentialState.DidCommCredentialState.CredentialReceived
];
const didCommMessageRoleMapping = {
	[V01_02MigrationCredentialRole.Issuer]: {
		proposalMessage: require_DidCommMessageRole.DidCommMessageRole.Receiver,
		offerMessage: require_DidCommMessageRole.DidCommMessageRole.Sender,
		requestMessage: require_DidCommMessageRole.DidCommMessageRole.Receiver,
		credentialMessage: require_DidCommMessageRole.DidCommMessageRole.Sender
	},
	[V01_02MigrationCredentialRole.Holder]: {
		proposalMessage: require_DidCommMessageRole.DidCommMessageRole.Sender,
		offerMessage: require_DidCommMessageRole.DidCommMessageRole.Receiver,
		requestMessage: require_DidCommMessageRole.DidCommMessageRole.Sender,
		credentialMessage: require_DidCommMessageRole.DidCommMessageRole.Receiver
	}
};

//#endregion