import { ReactNode } from 'react'; import { Region } from '../../services/api'; import { Locale } from '../../types/Locale'; import { SafeProxyHeaders } from '../../types/props'; import { ClientCuringSubmission } from './buildCuringRequestData'; import { CurableIssueType } from './curableIssues'; export type TaxbitCuringDocumentationProps = Record> = { /** * Render against the given list of open curable issue types — no * network calls. Presence of this prop is the demo discriminator; * pass an empty array if you specifically want to render the * widget with no issues. Status is assumed `OPEN` for each. */ demoIssueTypes: CurableIssueType[]; language?: Locale; poweredByTaxbit?: boolean; collectSignatureName?: boolean; /** * Demo-only callback fired when the user submits the form. Receives * the canonical `ClientCuringSubmission` — the same camelCase shape * production hands to `onSuccess` / `onSettled`. Mirrors how * `TaxbitQuestionnaire`'s demo `onSubmit` receives the same * `ClientTaxDocumentation` it'd hand back in production. */ onSubmit?: (submission: ClientCuringSubmission) => void | Promise; bearerToken?: never; staging?: never; region?: never; proxyDomain?: never; proxyHeaders?: never; loadingComponent?: never; onSuccess?: never; onError?: never; onSettled?: never; } | { demoIssueTypes?: never; bearerToken: string; staging?: boolean; region?: Region; proxyDomain?: never; proxyHeaders?: never; language?: Locale; poweredByTaxbit?: boolean; collectSignatureName?: boolean; loadingComponent?: ReactNode; onSuccess?: (submission: ClientCuringSubmission) => void; onError?: (error: Error) => void; onSettled?: (submission: ClientCuringSubmission) => void; onSubmit?: never; } | { demoIssueTypes?: never; bearerToken: string; staging?: never; region?: never; proxyDomain?: string; proxyHeaders?: SafeProxyHeaders; language?: Locale; poweredByTaxbit?: boolean; collectSignatureName?: boolean; loadingComponent?: ReactNode; onSuccess?: (submission: ClientCuringSubmission) => void; onError?: (error: Error) => void; onSettled?: (submission: ClientCuringSubmission) => void; onSubmit?: never; }; /** * Public curing-documentation widget. Mirrors `TaxbitQuestionnaire`'s * three-way discriminator (demo / region+staging / proxyDomain) but with a * single conditional fork: presence of `demoIssueTypes` renders the UI * directly against a synthesized fixture; production wires through Persist * for the status fetch + multipart POST. * * The host should gate the mount on `useTaxbit().needsCuringDocumentation` * — the Persist's internal fail-safe `null`s out when there's nothing to * cure, but the host saves a round-trip by checking first. */ export declare const TaxbitCuringDocumentation: >(props: TaxbitCuringDocumentationProps) => import("react/jsx-runtime").JSX.Element;