import { type HTMLAttributes } from 'react'; /** One party's standing on the document. */ export type SignatureParty = 'signed' | 'pending' | 'notRequired'; /** The chip's derived state. */ export type SignatureStatus = 'signed' | 'partial' | 'unsigned' | 'notRequired'; /** * The parties a document can require. `secondary` is the second signee on a * two-signee envelope (platform: `secondary_signee_id`) — a guardian, parent * or co-signer. It is optional: a document that does not need one leaves it * `notRequired`, which is the default. */ export type SignatureRole = 'operator' | 'patient' | 'secondary'; /** * Who a party is, and — when they cannot sign for themselves — who signs in * their place. A minor, or an adult who lacks capacity, is still the party * the document is about; the parent, guardian or legal representative signs * on their behalf. The standing (`signed` / `pending`) stays on the party, * because it is their signature slot that is being filled. */ export interface SignerRepresentative { /** The representative's display name. */ name: string; /** * Already-translated relationship to the party, e.g. "Mother", * "Legal guardian". Same contract as `SignerRoster.relationship` — the * host translates it, because the set is open. */ relationship?: string; /** * This representative's own standing. Supply it when representatives can * be at different stages — both parents must consent and only one has * signed. Omit it and the representative inherits the party's standing, * which is the right default when a single person signs. */ standing?: Exclude; } export interface SignerIdentity { /** The party's own display name. */ name: string; /** * Who signs in this party's place, when the party cannot sign for * themselves. One representative for the ordinary guardian case; several * where every one of them must sign — both parents consenting for a minor, * where the minor never signs at all. * * When representatives carry their own `standing`, they become the source * of truth for this party: the slot is `signed` only once every one of * them has signed. Pass the same values to {@link signatureStatusOf} so * host-side filtering agrees with the chip. */ signedBy?: SignerRepresentative | SignerRepresentative[]; } /** * A party's effective standing. Representatives that carry their own * `standing` override the party value, because they are the signatures that * actually have to land: every one of them must sign before the slot is * complete. */ export declare function effectiveStanding(party: SignatureParty, identity?: string | SignerIdentity): SignatureParty; /** * Display names for the signers, when the host has them and chooses to show * them. A bare string is the common case; pass a {@link SignerIdentity} where * someone signs on the party's behalf. */ export type SignatureSignerNames = Partial>; /** * The rule, exported so hosts can sort/filter by the same state the chip * shows: required = parties not `notRequired`; all signed → `signed`, some * signed → `partial`, none signed → `unsigned`, nobody required → `notRequired`. * * `secondary` is optional and defaults to `notRequired`, so existing * two-argument calls keep their exact meaning. */ export declare function signatureStatusOf(operator: SignatureParty, patient: SignatureParty, secondary?: SignatureParty, names?: SignatureSignerNames): SignatureStatus; export interface SignatureStatusChipProps extends Omit, 'children'> { /** The operator's standing. */ operator: SignatureParty; /** The patient's standing. */ patient: SignatureParty; /** * The second signee's standing on a two-signee envelope — a guardian, * parent or co-signer. Defaults to `notRequired`, so a document with only * an operator and a patient behaves exactly as before. */ secondary?: SignatureParty; /** * Display names for the signers, keyed by role. Supply them and the * breakdown reads "Operator: Dr Rossi (signed)" instead of "Operator * signed"; omit them and only the roles are named. * * A role may be a bare name, or a {@link SignerIdentity} when someone * signs on that party's behalf — a parent for a minor, a guardian for an * adult who lacks capacity. Then the row reads "Patient: M. Bianchi, * signed by A. Bianchi (Parent)". * * A name is shown in the chip's accessible name and its hover title, so * pass one only where the viewer is already entitled to see that person — * these are real people, and on the patient row usually a patient. Roles * with no name fall back to the role alone, so a partial map is fine. */ names?: SignatureSignerNames; /** Chip height — maps onto the Badge `sm` / `md` sizes. */ size?: 'sm' | 'md'; /** * Spell the breakdown in the chip text ("Signed · Operator signed · Patient * signed") instead of the summary word. Default false — the breakdown is * always in the accessible name / title. */ detail?: boolean; /** * Make the breakdown reachable by keyboard and touch, not only on hover. * * The chip becomes focusable and the breakdown moves out of the accessible * name into the kit's `Tooltip`, which exposes it as the accessible * description. Screen readers then hear the summary once and the detail * once, instead of the whole string twice. * * Off by default for two reasons. It adds a tab stop, and a table of forty * chips should not add forty; and it **requires a `TooltipProvider` above * it** — without one the kit's Tooltip throws. Turn it on where the * breakdown is something the user has to act on. */ tooltip?: boolean; /** Agent-readiness consumer id, surfaced as `data-component-id`. */ id?: string; } export declare const SignatureStatusChip: import("react").ForwardRefExoticComponent>; //# sourceMappingURL=signature-status-chip.d.ts.map