import { DidCommDidExchangeState } from "./DidCommDidExchangeState.mjs";

//#region ../didcomm/src/modules/connections/models/DidCommConnectionState.ts
/**
* Connection states as defined in RFC 0160.
*
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0160-connection-protocol/README.md#states
*/
let DidCommConnectionState = /* @__PURE__ */ function(DidCommConnectionState$1) {
	DidCommConnectionState$1["Null"] = "null";
	DidCommConnectionState$1["Invited"] = "invited";
	DidCommConnectionState$1["Requested"] = "requested";
	DidCommConnectionState$1["Responded"] = "responded";
	DidCommConnectionState$1["Complete"] = "complete";
	return DidCommConnectionState$1;
}({});
function rfc0160StateFromDidExchangeState(didExchangeState) {
	return {
		[DidCommDidExchangeState.Start]: DidCommConnectionState.Null,
		[DidCommDidExchangeState.Abandoned]: DidCommConnectionState.Null,
		[DidCommDidExchangeState.InvitationReceived]: DidCommConnectionState.Invited,
		[DidCommDidExchangeState.InvitationSent]: DidCommConnectionState.Invited,
		[DidCommDidExchangeState.RequestReceived]: DidCommConnectionState.Requested,
		[DidCommDidExchangeState.RequestSent]: DidCommConnectionState.Requested,
		[DidCommDidExchangeState.ResponseReceived]: DidCommConnectionState.Responded,
		[DidCommDidExchangeState.ResponseSent]: DidCommConnectionState.Responded,
		[DidCommDidExchangeState.Completed]: DidCommConnectionState.Complete
	}[didExchangeState];
}

//#endregion
export { DidCommConnectionState, rfc0160StateFromDidExchangeState };
//# sourceMappingURL=DidCommConnectionState.mjs.map