import type { EventEmitter } from '../../stencil-public-runtime'; import type { ReceiptActionDetail, ReceiptParty, ReceiptService, ReceiptStatus } from './mud-receipt.types'; /** * Receipt — confirmation surface for a finished Moldovan e-Gov transaction * (molecule). * * Pattern B (composed molecule): renders its own header / amount block / * details list / QR / footer in shadow DOM. Composes `mud-logo`, `mud-tag`, * and `mud-button` for the interactive pieces. * * Four sibling variants share one element via the `service` attribute — * each maps to one of the e-Gov properties: * * - `service="mpay"` (default) — payment receipt * - `service="mpass"` — authentication session log * - `service="msign"` — signature receipt * - `service="mdelivery"` — delivery confirmation * * The receipt is a presentational artifact. It does not fetch, validate, * or persist; callers pass already-formatted values. The QR (default slot * `qr` overrides) is generated client-side from the `qrData` prop via a * vendored byte-mode QR encoder — no runtime dependency, no network. * * Print: the host carries `@media print` rules to hide action buttons, * drop shadows, and force ink-primary text so a citizen can print the * receipt without the surrounding UI bleeding through. * * Romanian voice ships as defaults; every label is overridable via the * public `@Prop` surface for localisation. * * @element mud-receipt * * @slot qr - Override the generated QR. When populated, the built-in * encoder is skipped and the consumer takes full ownership of * the verification visual. * @slot actions - Override the footer action buttons. When populated, the * built-in `Imprimă / Descarcă PDF / Trimite email / * Distribuie` set is replaced wholesale. * @slot extra - Optional additional detail rows appended after the * built-in description / transaction-id block. */ export declare class MudReceipt { /** * Which e-Gov property this receipt belongs to. Drives the rendered logo, * the default title, and the `service` attribute carried in event detail. * @default 'mpay' */ service: ReceiptService; /** * Plain-text receipt title. Defaults to a Romanian per-service string * (`Bon de plată`, `Confirmare autentificare`, `Confirmare semnătură`, * `Confirmare livrare`). * * Attribute name is `title-text` to avoid collision with the built-in * HTML `title` global attribute (Stencil warns and the global wins at * runtime). Prop name remains `titleText` for ergonomic JS access. */ titleText?: string; /** * Transaction lifecycle state. Drives the status tag color + label. */ status?: ReceiptStatus; /** * Pre-formatted amount string (e.g. `"150,00"`). The receipt does NOT * format numbers — locale-aware grouping and decimal style belong to * the caller. Omit to hide the amount panel entirely (used by mpass / * msign receipts that carry no monetary value). */ amount?: string; /** * Currency code rendered next to the amount. * @default 'MDL' */ currency: string; /** * Date in ISO-8601 form (`"2026-05-22T14:32:00Z"`). Rendered via * `Intl.DateTimeFormat(this.locale, …)`. Falls back to the raw string * on a parse failure. */ date?: string; /** * BCP-47 locale used by the built-in date formatter. Override for * non-Romanian surfaces. * @default 'ro-RO' */ locale: string; /** Sender party. `idnp` is auto-masked (`2002******789`). */ sender?: ReceiptParty; /** Recipient party. `idnp` is auto-masked. */ recipient?: ReceiptParty; /** Free-text description rendered as its own row. */ description?: string; /** Opaque transaction identifier rendered in the footer caption. */ transactionId?: string; /** * Payload encoded into the QR. When empty AND no `qr` slot is provided, * the QR panel is hidden entirely. */ qrData?: string; /** * Whether the built-in action footer renders. Disable for read-only * archival views. * @default true */ showActions: boolean; /** * Override for the receipt's accessible name. Defaults to the resolved * title plus status (e.g. "Bon de plată — Plătit"). Setting `aria-label` * directly on the host also works — captured on connect into * `resolvedAriaLabel` and stripped to avoid Stencil's attribute-observer / * render-loop antipattern (same pattern as mud-radio / mud-switch / * mud-tooltip / mud-accordion / mud-breadcrumb / mud-date-picker / mud-modal * / mud-pagination). */ label?: string; /** "Status:" inline label preceding the tag. */ statusLabel?: string; /** "Suma" label preceding the amount value. */ amountLabel?: string; /** "Data" label preceding the date. */ dateLabel?: string; /** "Plătitor" label preceding the sender. */ senderLabel?: string; /** "Beneficiar" label preceding the recipient. */ recipientLabel?: string; /** "Descriere" label preceding the free text. */ descriptionLabel?: string; /** "Cod tranzacție" label preceding the transaction ID. */ transactionIdLabel?: string; /** "Scanează pentru verificare" caption under the QR. */ qrCaption?: string; /** "Cod QR pentru verificare" accessible label on the QR figure. */ qrAriaLabel?: string; /** "Imprimă" button label. */ printLabel?: string; /** "Descarcă PDF" button label. */ downloadLabel?: string; /** "Trimite email" button label. */ emailLabel?: string; /** "Distribuie" button label. */ shareLabel?: string; private hasQrSlot; private hasActionsSlot; private hasExtraSlot; private resolvedAriaLabel?; host: HTMLMudReceiptElement; /** Fires when the user activates the "Descarcă PDF" action. */ mudDownload: EventEmitter; /** Fires when the user activates the "Distribuie" action. */ mudShare: EventEmitter; /** Fires when the user activates the "Trimite email" action. */ mudEmail: EventEmitter; /** Fires when the user activates the "Imprimă" action. */ mudPrint: EventEmitter; componentWillLoad(): void; private captureAriaLabel; protected syncLabel(next?: string): void; private detectSlots; private onSlotChange; private resolveTitle; private resolveAriaLabel; private actionDetail; private onDownload; private onShare; private onEmail; private onPrint; /** * Render the QR as inline SVG. The encoder returns a `boolean[][]` module * grid; we rasterise it into a single SVG `` made of horizontal runs * so the resulting markup is small enough for inline use. */ private renderQrSvg; private renderHeader; private renderAmount; private renderRow; private renderParty; private renderDetails; private renderQr; private renderActions; render(): any; }