import { Region } from '../../services/api'; import { SafeProxyHeaders } from '../../types/props'; import { ClientCuringSubmission } from './buildCuringRequestData'; import { CuringData, CuringFormState } from './types'; export type UseTaxbitCuringProps = Record> = { bearerToken: string; serverData: CuringData; staging?: boolean; region?: Region; proxyDomain?: string; proxyHeaders?: SafeProxyHeaders; onSuccess?: (submission: ClientCuringSubmission) => void; onError?: (error: Error) => void; onSettled?: (submission: ClientCuringSubmission) => void; }; /** * Widget-internal submit hook. Mirrors `useTaxbitPersist`'s role on the * questionnaire side: wraps the engine's `(state)` callback into the * curing-specific multipart POST. Not exported publicly — only the * `TaxbitCuringDocumentationPersist` calls it. * * Returns `{ submit, submitError }`. The engine (`useCuringState`) owns * `isSubmitting`, so we don't shadow that here — but submit failures are * tracked in local state so Persist can surface them through the same * `` path it uses for status-fetch errors (matching * `useTaxbitPersist.postError`). The optional `onError` host callback * still fires; this state is the in-SDK rendering signal. */ export declare const useTaxbitCuring: >({ bearerToken, serverData, staging, region, proxyDomain, proxyHeaders, onSuccess, onError, onSettled, }: UseTaxbitCuringProps) => { submit: (state: CuringFormState) => Promise; submitError: Error | undefined; };