import { BaseRecord, Tags } from "../../../storage/BaseRecord.js";
import { NonEmptyArray } from "../../../types.js";
import { W3cJsonCredential } from "../models/credential/W3cJsonCredential.js";
import { CredentialMultiInstanceState } from "../../../utils/credentialUseTypes.js";
import { W3cVerifiableCredential } from "../models/credential/W3cVerifiableCredential.js";

//#region src/modules/vc/repository/W3cCredentialRecord.d.ts
interface W3cCredentialRecordOptions {
  id?: string;
  createdAt?: Date;
  tags?: CustomW3cCredentialTags;
  /**
   * The W3C credential instances to store on the record.
   *
   * NOTE that all instances should contain roughly the same data (e.g. exp can differ slighty), as they should be usable
   * interchangeably for presentations (allowing single-use credentials and batch issuance).
   */
  credentialInstances: W3cCredentialRecordInstances;
}
type W3cCredentialRecordInstances = NonEmptyArray<{
  credential: string | W3cJsonCredential;
}>;
type CustomW3cCredentialTags = {
  /**
   * Expanded types are used for JSON-LD credentials to allow for filtering on the expanded type.
   */
  expandedTypes?: Array<string>;
};
type DefaultW3cCredentialTags = {
  issuerId: string;
  subjectIds: Array<string>;
  schemaIds: Array<string>;
  contexts: Array<string>;
  givenId?: string;
  claimFormat: W3cVerifiableCredential['claimFormat'];
  proofTypes?: Array<string>;
  cryptosuites?: Array<string>;
  types: Array<string>;
  algs?: Array<string>;
  /**
   * @since 0.6 - tag was not defined before 0.6
   */
  multiInstanceState?: CredentialMultiInstanceState;
};
declare class W3cCredentialRecord extends BaseRecord<DefaultW3cCredentialTags, CustomW3cCredentialTags> {
  static readonly type = "W3cCredentialRecord";
  readonly type = "W3cCredentialRecord";
  credentialInstances: W3cCredentialRecordInstances;
  /**
   * Tracks the state of credential instances on this record.
   *
   * NOTE: This defaults to `CredentialMultiInstanceState.SingleInstanceUsed` for records that
   * don't have a value set from before 0.6. We assume the credential has already been used.
   */
  multiInstanceState: CredentialMultiInstanceState;
  constructor(props: W3cCredentialRecordOptions);
  /**
   * Only here for class transformation. If credential is set we transform
   * it to the new credentialInstances array format
   */
  private set credential(value);
  get firstCredential(): W3cVerifiableCredential;
  static fromCredential(credential: W3cVerifiableCredential): W3cCredentialRecord;
  getTags(): Tags<DefaultW3cCredentialTags, CustomW3cCredentialTags>;
  /**
   * This overwrites the default clone method for records
   * as the W3cRecord has issues with the default clone method
   * due to how W3cJwtVerifiableCredential is implemented. This is
   * a temporary way to make sure the clone still works, but ideally
   * we find an alternative.
   */
  clone(): this;
  /**
   * encoded is convenience method added to all credential records
   */
  get encoded(): string | W3cJsonCredential;
}
//#endregion
export { CustomW3cCredentialTags, DefaultW3cCredentialTags, W3cCredentialRecord, W3cCredentialRecordInstances, W3cCredentialRecordOptions };
//# sourceMappingURL=W3cCredentialRecord.d.ts.map