import { default as React } from 'react'; export interface PolicyLimitsRowConfig { /** Helper line under the label (e.g. "Maximum amount per single transaction"). */ helperText: string; /** Stable identifier; must match the `id` of the corresponding field-array row. */ id: string; /** Display label (e.g. "Transaction Limit"). */ label: string; /** * Pre-filled amount used when the field-array entry has no explicit * `amount`. Also re-installed whenever the user toggles this row off, * so flipping the switch back and forth always lands on the configured * default rather than a stale typed value. The default is purely a * display / scratch value — wire mapping (`amountFromLimitRow`) still * ships `0` for any disabled row. */ defaultAmount?: number; /** * Inline validation message shown under the amount input when the row's * toggle is ON but `amount` is empty / `<= 0`. Required for validation to * fire — rows omitting it are treated as no-validation. */ errorMessage?: string; /** Optional placeholder for the amount input when empty. */ placeholder?: string; } export interface PolicyLimitsRowListProps { /** * RHF field-array path under which `CardPolicyLimitFieldValue[]` lives, * e.g. `"limits"`. */ name: string; /** * Per-row UI config (label / helper text / placeholder). Indexed by `id` * to the matching field-array entry — the wrapper can reorder rows by * permuting this array without re-seeding the field-array. */ rows: PolicyLimitsRowConfig[]; className?: string; /** * Whether each row paints its own L/R/T/B outer border so the stack * forms a self-contained bordered card. * * - `true` (default): builder layout. `PolicyInformationCard` only * draws `border-top`, so the limit rows themselves contribute the * bottom/side borders that close the section. * - `false`: AI / step-shell layout. The surrounding container * (e.g. a `TableWrapper`) already paints the outer border, so the * rows only need a `border-bottom` separator between adjacent * rows — otherwise we'd render a second bordered card inset inside * the step shell's own bordered card. */ hasOuterBorder?: boolean; style?: React.CSSProperties; } /** * Form-bound stack of toggleable limit rows. Each row binds to: * - `${name}.${i}.isEnabled` via a `ZeniSwitch` * - `${name}.${i}.amount` via a currency-formatted text field (visually * disabled when `isEnabled === false`) * * The `rows` prop is purely presentational config — the actual data is * sourced from the surrounding RHF form's field-array at `name`. */ declare const PolicyLimitsRowList: React.FC; export default PolicyLimitsRowList;