import { Field } from '../models'; import { TInsightObjectType } from '../types'; /** * Generate avatar label from customer name * @param {string} customerName * @returns {string} */ export declare function getAvatarLabel(customerName: string): string; export declare const isValidField: (data: unknown) => boolean; export declare const safePasrseField: (data: unknown) => Field | null; export declare const isInsightObjectType: (value: unknown) => value is TInsightObjectType; /** * Maps an array of strings to a single string with a given separator. * * @param array The array of strings to be mapped. * @param separator The separator to be used. Defaults to ','. * @returns A single string with the elements of the array joined by the separator. */ export declare const mapArrayToString: (array: string[], separator?: string) => string; /** * Swaps the elements at the two given indices in the given array. * * @param array The array to be modified. * @param index1 The index of the first element to be swapped. * @param index2 The index of the second element to be swapped. * @returns A new array with the elements at the two indices swapped. */ export declare const swapArrayElements: (array: T[], index1: number, index2: number) => T[]; export declare function hexToRgb(hex: string): { r: number; g: number; b: number; a: number; } | { r: number; g: number; b: number; a?: undefined; } | null; export declare function contrastChecker(r: string | number, g: string | number, b: string | number): number; export declare const getMaxLetter: ({ str, strLength, fontSize, fontFamily, maxWidth, handleError, }: { str: string; strLength: number; fontSize: number | string; fontFamily: string; maxWidth: number; handleError?: (error: unknown, info: any) => void; }) => any; export declare const getWidthOfText: ({ str, fontSize, fontFamily, handleError, }: { str: string; fontSize?: number; fontFamily?: string; handleError?: (error: unknown, info: any) => void; }) => number; export declare const degreesToRadians: ({ degrees, handleError, }: { degrees: number; handleError?: (error: unknown, info: any) => void; }) => number; export declare const memoization: , U>(func: (...args: T) => U, handleError: (error: unknown, info: any) => void) => ((args: T) => U) | undefined; export declare const roundNumberBy: (by?: number) => (value: number, handleError?: (error: unknown, info: any) => void) => number; export declare const findBaseDivisorBy10: (value: number, handleError?: (error: unknown, info: any) => void) => number; export declare const getSizeOfText: (params: { str: string; fontSize?: string; fontFamily?: string; handleError?: (error: unknown, info: any) => void; }) => { height: number; width: number; }; export declare function stripNumber(number: string | number): number;