/** * Card composer: Thai QR Payment header + PromptPay sub-mark + QR * matrix + centre-overlay icon. Layout + sizing follows the official * BOT/TBA Thai QR Payment brand guideline: * * - Card aspect 7.4 cm × 10.5 cm (0.7048) — portrait-ish * - Navy `#00427A` ("TQR Maximum Blue", brand book §4) * - Header band ~75 % of card width, ~3.5 : 1 aspect * - PromptPay sub-mark *left-aligned* under the header (narrow strip) * - QR ~85 % of card width, centred * - Centre-overlay icon ~10 % of QR (ECC-H recovers the obscured modules) * * ┌──────────────────────────┐ * │ ▓ THAI QR PAYMENT ▓ │ navy band, tight content crop * │ ⎡Pmt⎤ │ left-aligned narrow sub-mark * ├──────────────────────────┤ * │ ▓▓▓▓▓▓▓▓▓▓▓▓▓ │ * │ ▓▓▓▓▓ ┌┐ ▓▓▓▓▓ │ * │ ▓▓▓▓▓ └┘ ▓▓▓▓▓ │ small icon overlay (~10%) * │ ▓▓▓▓▓▓▓▓▓▓▓▓▓ │ * ├──────────────────────────┤ * │ optional merchant name │ * │ optional amount label │ * └──────────────────────────┘ * * Theme rules: * - `theme: 'color'` (default) → Thai_QR_Payment_Logo-01 + PromptPay2 (navy) * - `theme: 'silhouette'` → silhouette variant + PromptPay1 (black/white) * * Default PromptPay variant is `PromptPay2` (color theme) because the * brand book pairs the navy header with the navy PromptPay sub-mark. * Callers can override with `promptpayLogo` to pick `PromptPay1` (the * monochrome rounded-border variant) regardless of theme. */ import { COLOR_LOGOS } from '@thai-qr-payment/assets'; import type { QRMatrix } from '@thai-qr-payment/qr'; export type CardTheme = 'color' | 'silhouette'; export interface CardOptions { /** Brand artwork flavor. `color` keeps full fidelity, `silhouette` is monochrome. */ theme?: CardTheme; /** * Render the caption block (merchant name + amount) below the QR. * Defaults to `false` — opt in explicitly, then supply the text via * `merchantName` / `amountLabel`. */ showCaption?: boolean; /** Optional amount label rendered below the QR. Requires `showCaption`. */ amountLabel?: string; /** Optional merchant name rendered below the QR (above the amount). Requires `showCaption`. */ merchantName?: string; /** Background colour of the entire card. */ background?: string; /** Foreground / accent colour for text + silhouette artwork. */ accent?: string; /** QR module fill colour. Defaults to `#000000` for max scanner contrast. */ qrColor?: string; /** Override the Thai QR Payment header logo by registry name. */ headerLogo?: keyof typeof COLOR_LOGOS; /** Override the PromptPay sub-mark by registry name. */ promptpayLogo?: keyof typeof COLOR_LOGOS; /** * Overlay the Thai QR Payment icon at the centre of the QR matrix. * Defaults to `true` for `theme: 'color'`, `false` for `'silhouette'`. * Always pair with `encodeQR({ errorCorrectionLevel: 'Q' | 'H' })` * so the obscured modules are recoverable. */ centerOverlay?: boolean; } /** Compose the full Thai QR Payment card SVG. */ export declare function renderCard(matrix: QRMatrix, options?: CardOptions): string; //# sourceMappingURL=card.d.ts.map