import { SignedClientTaxDocumentation } from '@taxbit/utilities'; import { Region } from '../../services/api.ts'; import { QuestionnaireProp } from '../../types'; import { ClientTaxDocumentationStatus } from '../../types/client'; type UseTaxbitStatusProps = { bearerToken?: string; onError?: (error: Error) => void | Promise; questionnaire: QuestionnaireProp; staging?: boolean; region?: Region; proxyDomain?: string; proxyHeaders?: Record; prepopulateWithSavedData?: boolean; }; export declare const useTaxbitStatus: ({ bearerToken, questionnaire, staging, onError, region, proxyDomain, proxyHeaders, prepopulateWithSavedData, }: UseTaxbitStatusProps) => { serverData: SignedClientTaxDocumentation | undefined; statusData: ClientTaxDocumentationStatus | undefined; isLoading: boolean; error: Error | undefined; /** * Re-fetch both the status and the submission. Returns a Promise that * resolves when both fetches settle (success or error). Awaiting it * before reading derived state avoids the closure-stale race where a * caller reads pre-refresh values in the same render cycle as the * trigger. */ refresh: () => Promise; /** Re-fetch just the status. Resolves when that fetch settles. */ refreshStatus: () => Promise; /** Re-fetch just the submission. Resolves when that fetch settles. */ refreshSubmission: () => Promise; }; export {};