import { ClaimPath } from "../../sd-jwt-vc/disclosureFrame.mjs";
import { SdJwtVcRecord } from "../../sd-jwt-vc/repository/SdJwtVcRecord.mjs";
import "../../sd-jwt-vc/index.mjs";
import { MdocRecord } from "../../mdoc/repository/MdocRecord.mjs";
import "../../mdoc/index.mjs";
import { W3cCredentialRecord } from "../../vc/repository/W3cCredentialRecord.mjs";
import { W3cV2CredentialRecord } from "../../vc/repository/W3cV2CredentialRecord.mjs";
import { VerifiablePresentation } from "../../dif-presentation-exchange/models/index.mjs";
import "../../dif-presentation-exchange/index.mjs";
import "../../vc/index.mjs";
import { DcqlCredentialsForRequest, DcqlSelectiveDisclosure } from "./DcqlCredentialsForRequest.mjs";
import { DcqlCredential, DcqlMdocCredential, DcqlPresentationResult, DcqlQuery, DcqlQueryResult, DcqlSdJwtVcCredential, DcqlW3cVcCredential } from "dcql";
//#region src/modules/dcql/models/index.d.ts
type DcqlQuery$1 = DcqlQuery.Input | DcqlQuery.Output;
type DcqlCredential$1 = DcqlCredential.Model['Input'];
type DcqlMdocCredential$1 = DcqlMdocCredential.Model['Input'];
type DcqlSdJwtVcCredential$1 = DcqlSdJwtVcCredential.Model['Input'];
type DcqlW3cVcCredential$1 = DcqlW3cVcCredential.Model['Input'];
/**
 * Added to a valid claim set of a selectively disclosable credential (SD-JWT VC, W3C V2 SD-JWT VC).
 */
export interface DcqlClaimSetDisclosedPaths {
  /**
   * The paths to the claims in the credential that presenting the claim set discloses. Includes the
   * claims that are not selectively disclosable, which are always disclosed, and gives array elements
   * the position they have in the credential. That position can differ from the one in `output`, which
   * leaves out elements that are not disclosed, as the verifier receives it.
   *
   * A path stands for the claim and everything below it, so a claim that is disclosed as a whole has
   * a single path.
   *
   * Pass these as `disclosedPaths` when presenting the credential.
   */
  disclosed_paths?: ClaimPath[];
}
type WithDisclosedPaths<Claims> = Claims extends {
  valid_claim_sets: Array<infer ClaimSet>;
} ? Omit<Claims, 'valid_claim_sets'> & {
  valid_claim_sets: [ClaimSet & DcqlClaimSetDisclosedPaths, ...Array<ClaimSet & DcqlClaimSetDisclosedPaths>];
} : Claims;
type _DcqlFailedCredential = NonNullable<DcqlQueryResult['credential_matches'][string]['failed_credentials']>[number];
type _DcqlValidCredential = NonNullable<DcqlQueryResult['credential_matches'][string]['valid_credentials']>[number];
export type DcqlFailedCredential = Omit<_DcqlFailedCredential, 'claims'> & {
  claims: WithDisclosedPaths<_DcqlFailedCredential['claims']>;
  record: MdocRecord | SdJwtVcRecord | W3cCredentialRecord | W3cV2CredentialRecord;
};
export type DcqlValidCredential = Omit<_DcqlValidCredential, 'claims'> & {
  claims: WithDisclosedPaths<_DcqlValidCredential['claims']>;
  record: MdocRecord | SdJwtVcRecord | W3cCredentialRecord | W3cV2CredentialRecord;
};
export type DcqlMatchWithRecord = (Omit<DcqlQueryResult['credential_matches'][string], 'success'> & {
  success: true;
  valid_credentials: [DcqlValidCredential, ...DcqlValidCredential[]];
  failed_credentials?: [DcqlFailedCredential, ...DcqlFailedCredential[]];
}) | (Omit<DcqlQueryResult['credential_matches'][string], 'success'> & {
  success: false;
  failed_credentials?: [DcqlFailedCredential, ...DcqlFailedCredential[]];
});
type DcqlQueryResult$1 = Omit<DcqlQueryResult.Output, 'credential_matches'> & {
  credential_matches: Record<string, DcqlMatchWithRecord>;
};
export type DcqlEncodedPresentationsEntry = string | Record<string, unknown>;
export type DcqlEncodedPresentations = Record<string, [DcqlEncodedPresentationsEntry, ...DcqlEncodedPresentationsEntry[]]>;
export type DcqlPresentation = Record<string, [VerifiablePresentation, ...VerifiablePresentation[]]>;
type DcqlPresentationResult$1 = DcqlPresentationResult.Input;
//#endregion
export { DcqlCredential$1 as DcqlCredential, DcqlCredentialsForRequest, DcqlMdocCredential$1 as DcqlMdocCredential, DcqlPresentationResult$1 as DcqlPresentationResult, DcqlQuery$1 as DcqlQuery, DcqlQueryResult$1 as DcqlQueryResult, DcqlSdJwtVcCredential$1 as DcqlSdJwtVcCredential, DcqlSelectiveDisclosure, DcqlW3cVcCredential$1 as DcqlW3cVcCredential };
//# sourceMappingURL=index.d.mts.map