type DigitsConverter<I = string, O = string> = (value: I) => O;

declare const digitsEnToFa: DigitsConverter<string | number>;
declare const digitsEnToAr: DigitsConverter<string | number>;

declare const digitsFaToEn: DigitsConverter;
declare const digitsFaToAr: DigitsConverter;

declare const digitsArToFa: DigitsConverter;
declare const digitsArToEn: DigitsConverter;

declare function autoConvertDigitsToEN(value: string): string;

declare const enNums: string[];
declare const faNums: string[];
declare const arNums: string[];
declare const enDigitsRegex: RegExp;
declare const faDigitsRegex: RegExp;
declare const arDigitsRegex: RegExp;

declare const isArabic: (str: string, trimPattern?: RegExp) => boolean;
declare const hasArabic: (str: string) => boolean;

declare const faAlphabet = "\u0627\u0628\u067E\u062A\u062B\u062C\u0686\u062D\u062E\u062F\u0630\u0631\u0632\u0698\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u06A9\u06AF\u0644\u0645\u0646\u0648\u0647\u06CC";
declare const faNumber = "\u06F0\u06F1\u06F2\u06F3\u06F4\u06F5\u06F6\u06F7\u06F8\u06F9";
declare const faShortVowels = "\u064E\u0650\u064F";
declare const faOthers = "\u200C\u0622\u0627\u064B";
declare const faMixedWithArabic = "\u0652\u064C\u064D\u064B\u064F\u0650\u064E\u0651\u0654\u0670\u0621\u0643\u200C\u0629\u06C0\u0623\u0625\u064A\u0640\u0626\u0624\u060C";
declare const faText: string;
declare const faComplexText: string;

declare const TRIM_REGEX: RegExp;
declare const isPersian: (str: string, isComplex?: boolean, trimPattern?: RegExp) => boolean;
declare const isFarsi: (str: string, isComplex?: boolean, trimPattern?: RegExp) => boolean;
declare const hasPersian: (str: string, isComplex?: boolean) => boolean;
declare const hasFarsi: (str: string, isComplex?: boolean) => boolean;
declare function autoArabicToPersian(value: string): string;

declare function toPersianChars(str: string): string;

declare function wordsToNumber<TResult extends string | number>(words: string, config?: WordsToNumberOptions): TResult;
interface WordsToNumberOptions {
    digits?: "en" | "fa" | "ar";
    addCommas?: boolean;
    fuzzy?: boolean;
    autoConvertDigitsToEn?: boolean;
    autoConvertArabicCharsToPersian?: boolean;
}

interface NumberToWordsOptions {
    ordinal?: boolean;
}
type NumberToWordsType = (numberValue: number | string, options?: NumberToWordsOptions) => string | TypeError;
declare const numberToWords: NumberToWordsType;

declare const removeOrdinalSuffix: (word: string) => string;

declare const addOrdinalSuffix: (number?: string) => string;

declare const addCommas: (input: number | string) => string;

declare function removeCommas(str: string): number;

interface NationalIdGenerationOptions {
    preventRepeatedDigits?: boolean;
    maxRetries?: number;
    randomGenerator?: () => number;
}
interface NationalIdGenerationResult {
    nationalId: string;
    digits: number[];
    checkDigit: number;
    attempts: number;
    hasRepeatedDigits: boolean;
}
declare function createIranianNationalId(options?: NationalIdGenerationOptions): string;
declare function createIranianNationalIdDetailed(options?: NationalIdGenerationOptions): NationalIdGenerationResult;
declare function createIranianRoundNationalId(): string;
declare function isValidNationalIdFormat(nationalId: string): boolean;
declare function validateNationalIdChecksum(nationalId: string): boolean;

declare const validNationalIdPrefixes: Set<string>;
declare const invalidNationalIdSequences: Set<string>;
declare function verifyIranianNationalId(nationalId: string | number, options?: VerifyIranianNationalIdOptions): boolean;
interface VerifyIranianNationalIdOptions {
    checkPrefix?: boolean;
}

interface IProvince {
    code: number | string;
    city: string;
}
interface INationalId extends IProvince {
    parentCode: number;
}
interface IPlaceByNationalId {
    codes: number[] | string[];
    city: string;
    province: string;
}
declare function getPlaceByIranNationalId(nationalId?: string): IPlaceByNationalId | null | undefined;

declare function verifyIranianLegalId(legalId: string | number): boolean | undefined;

declare function verifyCardNumber(digits: number): boolean | undefined;

declare const cardNumberRegex: RegExp;
declare const acceptableKeywords: RegExp;

interface ExtractCardNumber {
    base: string;
    pure: string;
    index: number;
    isValid?: boolean;
    bankName?: string | null;
}
interface ExtractCardNumberOptions {
    checkValidation?: boolean;
    detectBankNumber?: boolean;
    filterValidCardNumbers?: boolean;
}
declare function extractCardNumber(str: string, options?: ExtractCardNumberOptions): ExtractCardNumber[];

interface IBank {
    code: string;
    name: string;
}
declare function getBankNameFromCardNumber(digits?: number | string): string | null | undefined;

declare function urlFix(url?: string, separator?: string): string | undefined;

declare function halfSpace(persianText: string): string;

type BillTypes = "آب" | "برق" | "گاز" | "تلفن ثابت" | "تلفن همراه" | "عوارض شهرداری" | "سازمان مالیات" | "جرایم راهنمایی و رانندگی" | "unknown";
interface BillTypesModel {
    [key: number]: BillTypes;
}
declare const billTypes: BillTypesModel;
type Currency = "toman" | "rial";
interface BillBarcodeModel {
    billId: number;
    paymentId: number;
}
interface BillResult {
    amount: number;
    type: string;
    barcode: string;
    isValid: boolean;
    isValidBillId: boolean;
    isValidBillPayment: boolean;
}
interface BillParams {
    billId?: number;
    paymentId?: number;
    currency?: Currency;
    barcode?: string;
}
declare class Bill {
    private readonly barcode;
    private readonly currency;
    private readonly billTypes;
    private billId;
    private billPayment;
    constructor({ billId, paymentId, currency, barcode }: BillParams);
    private setId;
    private setPaymentId;
    getAmount(): number;
    getBillType(): BillTypes;
    getBarcode(): string;
    findByBarcode(barcode?: string): BillBarcodeModel;
    verificationBillPayment(): boolean;
    verificationBillId(): boolean;
    private CalTheBit;
    verificationBill(): boolean;
    getResult(): BillResult;
}

interface ShebaProcess {
    normal: string;
    formatted: string;
}
interface ShebaResult {
    name: string;
    code: string;
    nickname: string;
    persianName: string;
    accountNumber?: string;
    accountNumberAvailable: boolean;
    formattedAccountNumber?: string;
    process?: (str: string) => ShebaProcess;
}
type ShebaMapCodes = Record<string, ShebaResult>;
declare const shebaMapCodes: ShebaMapCodes;

declare const shebaPattern: RegExp;
declare const shebaPatternCode: RegExp;
declare function getShebaInfo(shebaCode: string): ShebaResult | null;
declare function shebaIso7064Mod97(iban: string): number;
declare function isShebaValid(shebaCode: string): boolean;

interface PlateResult {
    info: PlateResultApi;
    isValid: boolean;
}
interface PlateApi {
    number: string;
    char?: string;
}
declare enum PlateTypes {
    Car = 1,
    Motorcycle = 2
}
type PlateResultApiTypeString = keyof typeof PlateTypes;
interface PlateResultDetailModel {
    firstTwoDigits: string;
    plateCharacter: string | null;
    nextThreeDigits: string;
    provinceCode: string;
}
interface PlateResultMotorcycleDetailModel {
    digits: string;
    provinceCode: string;
}
interface PlateResultApi {
    template: string;
    province: string | null;
    type: PlateResultApiTypeString;
    details: PlateResultDetailModel | PlateResultMotorcycleDetailModel;
    category: string | null;
}
type PlateOptions = string | PlateApi;
interface NormalizedPlate {
    numbers: string;
    char: string | undefined;
}

declare function getNumberPlateInfo(plate: PlateOptions): PlateResult;
declare function getPlateInfo(plate: NormalizedPlate): PlateResultApi;
declare function isPlateValid(plateInfo: PlateResultApi, plateNumber: string): boolean;
declare function getPlateHandler(plate: NormalizedPlate): (plate: NormalizedPlate) => PlateResultApi;
declare function carHandler(plate: NormalizedPlate): PlateResultApi;
declare function motorcycleHandler(plate: NormalizedPlate): PlateResultApi;

interface OperatorModel {
    province: string[];
    base: string;
    model?: string;
    operator: string;
    type: ("permanent" | "credit")[];
}
declare function getPhoneNumberPrefix(mobile: string): string;

declare function phoneNumberDetail(mobile: string): OperatorModel | null;

declare function isPhoneNumberValid(mobile: string): boolean;

declare function phoneNumberNormalizer(phoneNumber: string, token: "0" | "+98"): string;

declare function standardizeFaDateTime(datetime: string): string;
declare function checkFormatDateTime(datetime: string): boolean;
declare function getTimeNow(): number;

declare function timeAgo(datetime?: string): string;

type RemainingTime = {
    years: number;
    months: number;
    days: number;
    hours: number;
    minutes: number;
    seconds: number;
};
type ToString = {
    toString: () => string;
};
type IsFinished = {
    isFinished: boolean;
};
declare function remainingTime(date: string | number | Date): RemainingTime & ToString & IsFinished;

declare const findCapitalByProvince: (state: string) => string;

interface Point {
    longitude: number;
    latitude: number;
}
interface Province {
    fa: string;
    en: string;
}
declare const findProvinceFromCoordinate: (pointToCheck: Point) => Province;

interface SlugifyOptions {
    separator?: string;
    lowercase?: boolean;
    removeRepeatedSeparators?: boolean;
    maxLength?: number;
    preserveNumbers?: boolean;
    customReplacements?: Record<string, string>;
}
declare function slugify(text: string, options?: SlugifyOptions): string;
declare function createSlug(text: string, separator?: string): string;
declare function slugifyWithNumbers(text: string, separator?: string): string;
declare function slugifySimple(text: string): string;

interface TextStatistics {
    totalCharacters: number;
    totalWords: number;
    totalSentences: number;
    totalParagraphs: number;
    persianCharacters: number;
    arabicCharacters: number;
    englishCharacters: number;
    numbers: number;
    punctuation: number;
    spaces: number;
    diacritics: number;
    vowels: number;
    consonants: number;
    uniqueWords: number;
    averageWordLength: number;
    longestWord: string;
    shortestWord: string;
}
interface TextRatios {
    persianRatio: number;
    arabicRatio: number;
    englishRatio: number;
    numberRatio: number;
    punctuationRatio: number;
    vowelRatio: number;
    consonantRatio: number;
    stopwordRatio: number;
    uniqueWordRatio: number;
}
interface ReadabilityMetrics {
    averageWordsPerSentence: number;
    averageCharactersPerWord: number;
    averageSyllablesPerWord: number;
    complexity: "ساده" | "متوسط" | "پیچیده";
    readingTime: number;
    difficulty: "آسان" | "متوسط" | "سخت";
    fleschScore: number;
}
interface LanguageDetection {
    primaryLanguage: "persian" | "arabic" | "english" | "mixed" | "unknown";
    confidence: number;
    isPurePersian: boolean;
    hasArabicChars: boolean;
    hasEnglishChars: boolean;
    dialectScore: number;
    formalityLevel: "رسمی" | "غیررسمی" | "متوسط";
}
interface SentimentAnalysis {
    polarity: "مثبت" | "منفی" | "خنثی";
    score: number;
    emotions: {
        joy: number;
        sadness: number;
        anger: number;
        fear: number;
        surprise: number;
        disgust: number;
    };
    dominant_emotion: string;
}
interface KeywordAnalysis {
    mostFrequentWords: Array<{
        word: string;
        frequency: number;
    }>;
    keywords: string[];
    technicalTerms: string[];
    entities: string[];
    topics: string[];
}
interface StyleAnalysis {
    formalityScore: number;
    technicalScore: number;
    informalityScore: number;
    writingStyle: "علمی" | "ادبی" | "روزنامه‌نگاری" | "غیررسمی" | "تکنیکال";
    toneOfVoice: "رسمی" | "دوستانه" | "حرفه‌ای" | "عاطفی" | "خشک";
}
interface TextAnalysisResult {
    originalText: string;
    cleanedText: string;
    statistics: TextStatistics;
    ratios: TextRatios;
    readability: ReadabilityMetrics;
    language: LanguageDetection;
    sentiment: SentimentAnalysis;
    keywords: KeywordAnalysis;
    style: StyleAnalysis;
    suggestions: string[];
    quality: {
        score: number;
        issues: string[];
        strengths: string[];
    };
}
interface TextAnalyzerOptions {
    includeReadability?: boolean;
    includeSentiment?: boolean;
    includeKeywords?: boolean;
    includeStyle?: boolean;
    includeSuggestions?: boolean;
    wordsPerMinute?: number;
    keywordLimit?: number;
}
declare function analyzeText(text: string, options?: TextAnalyzerOptions): TextAnalysisResult;
declare function getTextSummary(text: string): string;
declare function getTextComplexity(text: string): "ساده" | "متوسط" | "پیچیده";
declare function getTextSentiment(text: string): "مثبت" | "منفی" | "خنثی";
declare function getTextKeywords(text: string, limit?: number): string[];
declare function cleanText(text: string): string;
declare function normalizeText(text: string): string;

export { Bill, PlateTypes, TRIM_REGEX, acceptableKeywords, addCommas, addOrdinalSuffix, analyzeText, arDigitsRegex, arNums, autoArabicToPersian, autoConvertDigitsToEN, billTypes, carHandler, cardNumberRegex, checkFormatDateTime, cleanText, createIranianNationalId, createIranianNationalIdDetailed, createIranianRoundNationalId, createSlug, digitsArToEn, digitsArToFa, digitsEnToAr, digitsEnToFa, digitsFaToAr, digitsFaToEn, enDigitsRegex, enNums, extractCardNumber, faAlphabet, faComplexText, faDigitsRegex, faMixedWithArabic, faNumber, faNums, faOthers, faShortVowels, faText, findCapitalByProvince, findProvinceFromCoordinate, getBankNameFromCardNumber, getNumberPlateInfo, getPhoneNumberPrefix, getPlaceByIranNationalId, getPlateHandler, getPlateInfo, getShebaInfo, getTextComplexity, getTextKeywords, getTextSentiment, getTextSummary, getTimeNow, halfSpace, hasArabic, hasFarsi, hasPersian, invalidNationalIdSequences, isArabic, isFarsi, isPersian, isPhoneNumberValid, isPlateValid, isShebaValid, isValidNationalIdFormat, motorcycleHandler, normalizeText, numberToWords, phoneNumberDetail, phoneNumberNormalizer, remainingTime, removeCommas, removeOrdinalSuffix, shebaIso7064Mod97, shebaMapCodes, shebaPattern, shebaPatternCode, slugify, slugifySimple, slugifyWithNumbers, standardizeFaDateTime, timeAgo, toPersianChars, urlFix, validNationalIdPrefixes, validateNationalIdChecksum, verifyCardNumber, verifyIranianLegalId, verifyIranianNationalId, wordsToNumber };
export type { BillParams, BillResult, BillTypes, Currency, DigitsConverter, ExtractCardNumber, ExtractCardNumberOptions, IBank, INationalId, IPlaceByNationalId, IProvince, KeywordAnalysis, LanguageDetection, NationalIdGenerationOptions, NationalIdGenerationResult, NumberToWordsOptions, OperatorModel, PlateApi, PlateOptions, PlateResult, PlateResultApi, PlateResultApiTypeString, ReadabilityMetrics, SentimentAnalysis, ShebaMapCodes, ShebaProcess, ShebaResult, SlugifyOptions, StyleAnalysis, TextAnalysisResult, TextAnalyzerOptions, TextRatios, TextStatistics, VerifyIranianNationalIdOptions, WordsToNumberOptions };
