

const require_JsonTransformer = require('../../../utils/JsonTransformer.js');
require('../../../utils/index.js');
const require_Jwt = require('../../../crypto/jose/jwt/Jwt.js');
const require_ClaimFormat = require('../models/ClaimFormat.js');
const require_credentialTransformer = require('./credentialTransformer.js');

//#region src/modules/vc/jwt-vc/W3cJwtVerifiableCredential.ts
var W3cJwtVerifiableCredential = class W3cJwtVerifiableCredential {
	constructor(options) {
		this.jwt = options.jwt;
		this._credential = require_credentialTransformer.getCredentialFromJwtPayload(this.jwt.payload);
	}
	static fromSerializedJwt(serializedJwt) {
		return new W3cJwtVerifiableCredential({ jwt: require_Jwt.Jwt.fromSerializedJwt(serializedJwt) });
	}
	/**
	* Get the W3cCredential from the JWT payload. This does not include the JWT wrapper,
	* and thus is not suitable for sharing. If you need a JWT, use the `serializedJwt` property.
	*
	* All properties and getters from the `W3cCredential` interface are implemented as getters
	* on the `W3cJwtVerifiableCredential` class itself, so you can also use this directly
	* instead of accessing the inner `credential` property.
	*/
	get credential() {
		return this._credential;
	}
	get serializedJwt() {
		return this.jwt.serializedJwt;
	}
	get context() {
		return this.credential.context;
	}
	get id() {
		return this.credential.id;
	}
	get type() {
		return this.credential.type;
	}
	get issuer() {
		return this.credential.issuer;
	}
	get issuanceDate() {
		return this.credential.issuanceDate;
	}
	get expirationDate() {
		return this.credential.expirationDate;
	}
	get credentialSubject() {
		return this.credential.credentialSubject;
	}
	get credentialSchema() {
		return this.credential.credentialSchema;
	}
	get credentialStatus() {
		return this.credential.credentialStatus;
	}
	get issuerId() {
		return this.credential.issuerId;
	}
	get credentialSchemaIds() {
		return this.credential.credentialSchemaIds;
	}
	get credentialSubjectIds() {
		return this.credential.credentialSubjectIds;
	}
	get contexts() {
		return this.credential.contexts;
	}
	/**
	* The {@link ClaimFormat} of the credential. For JWT credentials this is always `jwt_vc`.
	*/
	get claimFormat() {
		return require_ClaimFormat.ClaimFormat.JwtVc;
	}
	/**
	* Get the encoded variant of the W3C Verifiable Credential. For JWT credentials this is
	* a JWT string.
	*/
	get encoded() {
		return this.serializedJwt;
	}
	get jsonCredential() {
		return require_JsonTransformer.JsonTransformer.toJSON(this.credential);
	}
};

//#endregion
exports.W3cJwtVerifiableCredential = W3cJwtVerifiableCredential;