import * as i0 from "@angular/core"; /** * For validating Iranian National code (number), you can use this service in your components or every other places using DI or not. */ export declare class NationalCodeService { /** * This method adds zero character at the beginning of the input until the length of the result reach to 10. * * This method removes spaces from right and left sides of the input. * * ATTENTION: This method doesn't any validation about correctness of the input if it has correct length (between 8 and 10). * * @param nationalCode a number with at most 10 digits or a string with at most 10 character. * @return a string with length equal to 10. * @throws InvalidNationalCodeError when length of the input value is greater than 10. */ normalize(nationalCode: number | string): string; /** * This method first normalizes the input using `normalize` method and implicitly checks input length, So you DO NOT NEED to * normalize input before, but this will not make any bad effect. * * [Then checking validation of the input using algorithm described in this link]{@link http://www.aliarash.com/article/codemeli/codemeli.htm} * * @param nationalCode */ isValid(nationalCode: number | string): boolean; /** * * [We are using for loop instead of match or split because it has better performance according to this link]{@link https://stackoverflow.com/a/46312614/5400597} * * @return true if all characters of the `input` are equal and input length is greater than 1. Otherwise returns false. * @param input */ private _isRepetitive; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }