import React, { ReactNode } from 'react'; import { CredentialsMeta } from '@truvity/widget__client'; import { EditWidgetErrors, WalletDid, EntityDid, CredentialDid, WidgetEditApi, WalletEditApi } from '../../types'; import { LinkedCredentialsPreviewRequests, LinkedCredentialsSuggestRequests } from '../../forms/widgets/linkedCredentials'; export declare type SlotProps = { draftIsValid: boolean; draftRevision: number; draftIsSaving: boolean; showErrors: () => void; meta?: CredentialsMeta; }; export declare type WalletEditDraftProps = (LinkedCredentialsPreviewRequests & LinkedCredentialsSuggestRequests) & { /** * The DID of a credential that we want to display for editing. */ draftId: CredentialDid; /** * The DID of the wallet that stores the credential that we want to display for editing. */ walletDid: WalletDid; /** * The DID of the entity that owns the wallet where the credential we want to display for editing is stored. */ entityDid: EntityDid; /** * An API client that provides support for the necessary widget service operations required to work with * the credential that we want to display for editing. */ widgetApi: WidgetEditApi; /** * An API client that provides support for the necessary wallet service operations required to work with * the credential that we want to display for editing. */ walletApi: WalletEditApi; /** * A callback that notifies when a widget is fully displayed and ready for interactions. */ onDisplayed?: () => void; /** * A callback that reports widget errors and allows for their handling. * If an error occurs, the widget will display an empty form without fields. */ onError?: (error: EditWidgetErrors) => void; /** * A render prop that displays content before all fields and inner controls. * The passed props include information about the state of the widget and credential metadata. */ headerSlotRenderer?: (renderProps: SlotProps) => ReactNode; /** * A render prop that displays content after all fields and inner controls. * The passed props include information about the state of the widget and credential metadata. */ footerSlotRenderer?: (renderProps: SlotProps) => ReactNode; }; export declare const WalletEditDraft: ({ draftId, walletDid, entityDid, headerSlotRenderer, footerSlotRenderer, onDisplayed, getVcPreview, suggestVc, onError, widgetApi, walletApi, }: WalletEditDraftProps) => React.JSX.Element | null; //# sourceMappingURL=WalletEditDraft.d.ts.map