

const require_JsonTransformer = require('../../../utils/JsonTransformer.js');
require('../../../utils/index.js');
const require_Jwt = require('../../../crypto/jose/jwt/Jwt.js');
require('../../../crypto/index.js');
const require_W3cJwtVerifiablePresentation = require('../../vc/jwt-vc/W3cJwtVerifiablePresentation.js');
const require_W3cJsonLdVerifiablePresentation = require('../../vc/data-integrity/models/W3cJsonLdVerifiablePresentation.js');
require('../../vc/index.js');
const require_MdocDeviceResponse = require('../../mdoc/MdocDeviceResponse.js');
require('../../mdoc/index.js');
const require_SdJwtVcApi = require('../../sd-jwt-vc/SdJwtVcApi.js');
require('../../sd-jwt-vc/index.js');

//#region src/modules/dif-presentation-exchange/utils/transform.ts
function getSphereonOriginalVerifiableCredential(credentialRecord) {
	return credentialRecord.encoded;
}
function getSphereonOriginalVerifiablePresentation(verifiablePresentation) {
	return verifiablePresentation.encoded;
}
function getVerifiablePresentationFromEncoded(agentContext, encodedVerifiablePresentation) {
	if (typeof encodedVerifiablePresentation === "string" && encodedVerifiablePresentation.includes("~")) return agentContext.dependencyManager.resolve(require_SdJwtVcApi.SdJwtVcApi).fromCompact(encodedVerifiablePresentation);
	if (typeof encodedVerifiablePresentation === "string" && require_Jwt.Jwt.format.test(encodedVerifiablePresentation)) return require_W3cJwtVerifiablePresentation.W3cJwtVerifiablePresentation.fromSerializedJwt(encodedVerifiablePresentation);
	if (typeof encodedVerifiablePresentation === "object" && "@context" in encodedVerifiablePresentation) return require_JsonTransformer.JsonTransformer.fromJSON(encodedVerifiablePresentation, require_W3cJsonLdVerifiablePresentation.W3cJsonLdVerifiablePresentation);
	return require_MdocDeviceResponse.MdocDeviceResponse.fromBase64Url(encodedVerifiablePresentation);
}

//#endregion
exports.getSphereonOriginalVerifiableCredential = getSphereonOriginalVerifiableCredential;
exports.getSphereonOriginalVerifiablePresentation = getSphereonOriginalVerifiablePresentation;
exports.getVerifiablePresentationFromEncoded = getVerifiablePresentationFromEncoded;