import { CardType } from '@mangopay/checkout-sdk-core'; import { default as default_2 } from 'react'; import { DefaultTheme } from 'styled-components'; import { FC } from 'react'; import { FormEventHandler } from 'react'; import { FunctionComponent } from 'react'; import { LookupMetadataOutput } from '@mangopay/checkout-sdk-core'; import { ReactNode } from 'react'; import { StyledComponent } from 'styled-components'; import { Validator } from '@mangopay/checkout-sdk-core'; export declare const Button: FC; export declare const CardForm: FunctionComponent; export declare interface CardFormProps { onSubmit: FormEventHandler; totalAmountToDisplay: string; vendorName: string; logo: string | null; onChange: (name: string, value: string, error?: UnTypedValidationError) => void; values: InitialFormState; formState: { isLoading: boolean; isValid: boolean; }; cardType: CardType; cardMetadata?: LookupMetadataOutput; onCancel: () => void; } export declare const Column: StyledComponent<"div", DefaultTheme, { className: "GridColumn"; }, "className">; export declare const Dropdown: FunctionComponent; export declare const DropdownArrowWrapper: StyledComponent<"span", DefaultTheme, {}, never>; export declare const DropdownContainer: StyledComponent<"div", DefaultTheme, DropdownContainerProps, never>; export declare interface DropdownContainerProps { isInvalid?: boolean; isFocused?: boolean; } export declare const DropdownContent: StyledComponent<"ul", DefaultTheme, {}, never>; export declare const DropdownItem: StyledComponent<"div", DefaultTheme, DropdownItemProps, never>; export declare const DropdownItemLabel: StyledComponent<"div", DefaultTheme, {}, never>; export declare interface DropdownItemProps { isSelected?: boolean; } export declare const DropdownLabel: StyledComponent<"p", DefaultTheme, {}, never>; export declare interface DropdownOption { name?: string; key?: string; logoSrc?: default_2.ReactNode; } export declare interface DropdownProps { selectedOption?: DropdownOption; options?: DropdownOption[]; onSelect?: (option: DropdownOption) => void; } export declare const DropdownTrigger: StyledComponent<"button", DefaultTheme, { isOpen: boolean; isDirty?: boolean; }, never>; export declare const DropdownTriggerIconWrap: StyledComponent<"div", DefaultTheme, {}, never>; declare interface FlexBoxProps { alignContent?: string; alignItems?: string; display?: string; flexFlow?: string; flexDirection?: string; flexWrap?: string; justifyContent?: string; width?: string | number; gap?: string | number; position?: string; } declare type Formatter = (value: string, event?: Event) => string; export declare const FullPageLayout: ({ children, language }: { children: ReactNode; language: Language; }) => default_2.JSX.Element; declare interface InitialFormState { cardHolder: string; cardNumber: string; cardExpirationDate: string; cardCvx: string; preferredCardNetwork?: 'CB' | 'VISA' | 'MASTERCARD'; } declare type Language = 'es' | 'fr' | 'en' | 'nl' | 'pt' | 'sv' | 'it' | 'pl' | 'fi' | 'no' | 'cs' | 'da' | 'el' | 'hu' | 'sk'; export declare const LegalBlock: () => default_2.JSX.Element; export declare const OptionIconWrapper: StyledComponent<"div", DefaultTheme, OptionIconWrapperProps, never>; export declare interface OptionIconWrapperProps { mr?: string; } export declare const PaymentResultScreen: ({ type, returnUrl, totalAmount, vendorName, onRedirect, }: PaymentResultScreenProps) => default_2.JSX.Element; declare interface PaymentResultScreenProps { type: PaymentResultType; returnUrl?: string; totalAmount?: string; vendorName?: string; onRedirect?: () => void; } declare type PaymentResultType = PaymentStatus | UIErrorType; declare type PaymentStatus = 'SUCCEEDED' | 'FAILED' | 'PENDING'; export declare const Row: StyledComponent<"div", DefaultTheme, { className: "GridRow"; }, "className">; export declare const StyledArrowDownIcon: StyledComponent<"span", DefaultTheme, {}, never>; export declare const StyledBackArrow: StyledComponent<"button", DefaultTheme, {}, never>; declare interface StyledButtonProps { variant?: 'full' | 'clear'; type?: 'submit' | 'reset'; onClick?: () => void; disabled?: boolean; children?: React.ReactNode; } export declare const StyledVendorInfoBlock: StyledComponent<"div", DefaultTheme, FlexBoxProps, never>; export declare const StyledVendorInfoBlockTitle: StyledComponent<"h1", DefaultTheme, {}, never>; export declare const StyledVendorLogo: StyledComponent<"img", DefaultTheme, { loading: "lazy"; decoding: "async"; }, "loading" | "decoding">; export declare const StyledVendorName: StyledComponent<"h2", DefaultTheme, {}, never>; export declare const ThreeDsIframe: ({ onClose, src, onLoad, onError }: ThreeDsIframeProps) => default_2.JSX.Element; declare interface ThreeDsIframeProps { onClose: () => void; src: string; onLoad?: () => void; onError?: default_2.ReactEventHandler; } declare interface Translation { 'card-information.header.label': string; 'card.number.placeholder': string; 'card.number.aria-label': string; 'card.number.errors.required': string; 'card.number.errors.min-length': string; 'card.number.errors.invalid-number': string; 'card.psp.legal.notice': string; 'card.psp.legal.check': string; 'card.psp.legal.privacy': string; 'card.save.label': string; 'card.saved-cards.choose-card.label': string; 'card.saved-cards.clear-card.label': string; 'card.saved-cards.saved-card.aria-label': string; 'card.billing-name.placeholder': string; 'card.billing-name.aria-label': string; 'card.billing-name.errors.required': string; 'card.billing-name.errors.min-length': string; 'card.billing-name.errors.max-length': string; 'card.billing-name.errors.invalid-characters': string; 'card.expiry.placeholder': string; 'card.expiry.aria-label': string; 'card.expiry.errors.required': string; 'card.expiry.errors.pattern': string; 'card.expiry.errors.expired': string; 'card.cvc.placeholder': string; 'card.cvc.aria-label': string; 'card.cvc.errors.required': string; 'card.cvc.errors.min-length': string; 'card.cvc.errors.max-length': string; 'billing-address.same-as-shipping.label': string; 'billing-address.country.placeholder': string; 'billing-address.country.aria-label': string; 'billing-address.country.errors.required': string; 'billing-address.zip.placeholder': string; 'billing-address.zip.aria-label': string; 'billing-address.zip.errors.required': string; 'billing-address.zip.errors.min-length': string; 'pay-button.label': string; 'pay-button.aria-label': string; 'payment-methods.card.label': string; 'payment-methods.show-less.label': string; 'payment-methods.show-more.label': string; 'payment-methods.applepay.label': string; 'payment-methods.applepay.aria-label': string; 'payment-methods.googlepay.label': string; 'payment-methods.googlepay.aria-label': string; 'payment-methods.paypal.label': string; 'payment-methods.paypal.aria-label': string; 'payment-methods.paypal.overlay.continue': string; 'payment-methods.paypal.overlay.message': string; 'payment-success-state.label': string; 'redirect-note.label': string; 'error.invalid_cvc': string; 'error.authorization_required': string; 'error.contact_card_issuer': string; 'error.unsupported_card': string; 'error.insufficient_funds': string; 'error.unsupported_currency': string; 'error.card_rejected': string; 'error.expired_card': string; 'error.suspected_fraud': string; 'error.general_decline': string; 'error.incorrect_number': string; 'error.incorrect_pin': string; 'error.invalid_address': string; 'error.invalid_card_or_account': string; 'error.invalid_amount': string; 'error.invalid_date': string; 'error.lost_restricted_or_stolen_card': string; 'error.blocked_list': string; 'error.not_permitted': string; 'error.offline_or_online_pin_required': string; 'error.pin_retry_exceeded': string; 'error.processing_error': string; 'error.withdrawal_count_limit_exceeded': string; 'error.unknown': string; 'error.fraud': string; 'error.three_d_secure': string; 'error.custom_rule': string; 'error.payment_cancelled': string; 'error.payment_rejected': string; 'error.internal_server_error': string; 'error.institution_not_responding': string; 'error.authorize.payment-already-authorized': string; 'error.param_error': string; 'error.payment_restart': string; 'error.ressource_not_found': string; } declare type TranslationKey = keyof Translation; declare type UIErrorType = 'notFound' | 'somethingWentWrong' | 'invalidToken'; declare type UnTypedValidationError = { type: string; message: string; }; export declare const VALIDATION_MAP: Record<'cardHolder' | 'cardNumber' | 'cardExpirationDate' | 'cardCvx', ValidationMap>; export declare interface ValidationMap { formatter: Formatter; validation: { validator: Validator; validationOrder: ValidationErrorType[]; validationMessageByErrorType?: Record; isCardFormValidationTriggered?: boolean; }; } export { } declare module 'styled-components' { // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface DefaultTheme extends Theme {} }