import { AbstractControl, ValidationErrors } from '@angular/forms'; import { BehaviorSubject } from 'rxjs'; import * as i0 from '@angular/core'; declare class CreditCardValidators { static validateCCNumber(control: AbstractControl): ValidationErrors | null; static validateExpDate(control: AbstractControl): ValidationErrors | null; } interface CardDefinition { type: string; patterns: number[]; format: RegExp; length: number[]; cvvLength: number[]; luhn: boolean; } declare class CreditCard { static cards(): CardDefinition[]; static cardFromNumber(num: string): CardDefinition; static restrictNumeric(e: KeyboardEvent): boolean; static hasTextSelected(target: HTMLInputElement): boolean; static cardType(num: string): string; static formatCardNumber(num: string): string; static safeVal(value: string, target: HTMLInputElement, updateValue: (value: string) => void): number; static isCardNumber(key: number, target: HTMLInputElement): boolean; static restrictExpiry(key: number, target: HTMLInputElement): boolean; static replaceFullWidthChars(str: string): string; static formatExpiry(expiry: string): string; static restrictCvc(key: number, target: HTMLInputElement): boolean; static luhnCheck(num: string): boolean; } declare class CreditCardFormatDirective { private el; private target; private control; private cards; resolvedScheme$: BehaviorSubject; /** * Updates the value to target element, or FormControl if exists. * @param value New input value. */ private updateValue; onKeypress(e: KeyboardEvent): void; onKeydown(e: KeyboardEvent): void; onKeyup(): void; onPaste(): void; onChange(): void; onInput(): void; private formatCardNumber; private formatBackCardNumber; private setCardType; private reFormatCardNumber; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class CvcFormatDirective { private el; private target; private control; /** * Updates the value to target element, or FormControl if exists. * @param value New input value. */ private updateValue; onKeypress(e: KeyboardEvent): void; reformatCvc(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class ExpiryFormatDirective { private el; private target; private control; /** * Updates the value to target element, or FormControl if exists. * @param value New input value. */ private updateValue; onKeypress(e: KeyboardEvent): boolean; onKeydown(e: KeyboardEvent): void; onChange(): void; onInput(): void; private formatExpiry; private formatForwardSlashAndSpace; private formatForwardExpiry; private formatBackExpiry; private reformatExpiry; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class CreditCardDirectivesModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { CreditCard, CreditCardDirectivesModule, CreditCardFormatDirective, CreditCardValidators, CvcFormatDirective, ExpiryFormatDirective }; export type { CardDefinition };