import * as react_jsx_runtime from 'react/jsx-runtime'; /** * BankStatementGenerateDialog — WealthX DS (L4 Template) * * Dialog for generating a new bank statement PDF from connected bank accounts. * Shown when the user clicks "Generate" in the Bank Statement tab of * `OpportunityDetailsDrawer`. * * Internal state: * - Statement name (Input) * - Range preset: 90 / 180 / 365 days or Custom (ToggleGroup + DatePickers) * - Applicant type: primary / secondary (ToggleGroup, matching Statement period) * - Selected bank account IDs (Table with Checkboxes, paginated at 5/page) * * Data handed in via props (consumer owns fetching): * - `bankAccounts` — pre-filtered for the current `applicantType` * - `isLoadingAccounts` — spinner while the consumer re-fetches after type change * * Layer: L4 Template * * Data source: `useAggregatedBankAccounts` in backoffice (not included here) */ type BankStatementRangePreset = 90 | 180 | 365 | "custom"; interface BankStatementAccount { id: string; /** Display name for the account (e.g. "Everyday Savings"). */ name: string; /** BSB / account number string. */ accountNo?: string; /** Bank / institution name. */ institutionName?: string; /** URL to institution logo image. */ institutionLogo?: string; /** ISO date string of when the account was last synced. */ lastUpdated?: string; } interface BankStatementGeneratePayload { statementName: string; rangePreset: BankStatementRangePreset; /** ISO date string (YYYY-MM-DD). Set for all presets as well as custom. */ fromDate: string; /** ISO date string (YYYY-MM-DD). Set for all presets as well as custom. */ toDate: string; applicantType: "primary" | "secondary"; selectedAccountIds: string[]; } interface BankStatementGenerateDialogProps { open: boolean; onClose: () => void; /** * Called when the user clicks Generate (only if form is valid). * Consumer is responsible for the actual API call. */ onSubmit: (payload: BankStatementGeneratePayload) => void; /** * Called when the user changes the applicant type so the consumer can * re-fetch / re-filter bank accounts for the new type. */ onApplicantTypeChange?: (type: "primary" | "secondary") => void; /** * Bank accounts pre-filtered for the currently selected applicant type. * Pass an empty array while loading. */ bankAccounts: BankStatementAccount[]; /** Enable the "Co-applicant" option. When false it renders disabled, not hidden. */ hasCoApplicant?: boolean; /** Show a loading spinner in the accounts table while the consumer re-fetches. */ isLoadingAccounts?: boolean; /** Show a loading indicator on the Generate button while the API call is in flight. */ isLoading?: boolean; className?: string; } declare function BankStatementGenerateDialog({ open, onClose, onSubmit, onApplicantTypeChange, bankAccounts, hasCoApplicant, isLoadingAccounts, isLoading, className, }: BankStatementGenerateDialogProps): react_jsx_runtime.JSX.Element; export { type BankStatementAccount, BankStatementGenerateDialog, type BankStatementGenerateDialogProps, type BankStatementGeneratePayload, type BankStatementRangePreset };