import { InsightsPayload } from '../../../../core'; import { UpcomingBillDay } from '../../../components/UpcomingBillCard'; interface UpcomingBillBlockProps { payload: InsightsPayload; beatGuid?: string; } type SevenDays = [ UpcomingBillDay, UpcomingBillDay, UpcomingBillDay, UpcomingBillDay, UpcomingBillDay, UpcomingBillDay, UpcomingBillDay ]; /** * Parse an ISO `YYYY-MM-DD` into a local-time Date, dodging the UTC-midnight parse * that `new Date('2025-10-30')` performs (which drifts a day in negative offsets). * Any other string shape (full ISO datetime) falls through to the native parser. * * Returns `null` for anything that doesn't resolve to a valid Date — including a * `YYYY-MM-DD`-shaped string whose year/month/day segments produce `Invalid Date` * (e.g. `'2026-13-40'`) and arbitrary strings the native parser rejects. Callers * must handle `null` so a bad backend value cannot propagate `NaN` into the UI * via `getDay()` and render `NaN` day numbers. */ export declare const parseDueDate: (iso: string) => Date | null; /** * Build the Sun→Sat week around a due date with the due day marked `highlighted`. * Column index is the local day-of-week (0=Sun..6=Sat) so the strip always lines up * under the weekday labels regardless of which weekday the bill lands on. */ export declare const buildWeekStrip: (dueDate: Date) => SevenDays; /** * Upcoming Bill component block (Figma: "Full | Upcoming Bill"). Reads `due_date`, * `amount` and merchant facts off `instance_slot` (V2 flat shape — no * `instance_slot_data`), derives the Sun→Sat week around the due date, and renders * the shared `UpcomingBillCard`. * * Wrapped in `createVariantBlock` from day one so an added design branch is a new * registry entry, not a rewrite of dispatch logic. Today only * `projected_bill_payment` is defined; an unknown variant degrades to it. * * Degraded-date rendering: if `due_date` is missing or doesn't parse to a valid * Date (e.g. `'2026-13-40'`, `''`, an unparseable arbitrary string), the card * still renders — merchant row + amount — but with a neutral current-week strip * (no highlighted cell). `UpcomingBillCard` requires a 7-tuple `days` prop so we * cannot omit the strip without modifying the shared component; the "no highlighted * cell" fallback keeps the useful info visible without pretending today is the * due day. */ declare const UpcomingBillBlock: ({ payload, beatGuid }: UpcomingBillBlockProps) => import("react/jsx-runtime").JSX.Element; export default UpcomingBillBlock;