import { CSSProperties, MouseEvent, ReactNode } from 'react'; export type UnknownObject = Record; export type ParseBool = { noWord: string; yesWord: string; }; export type ParseImg = { style: CSSProperties; className: string; }; export type TransformFn = (value: unknown, index: number, row: T) => ReactNode; export type RowClickFn = (event: MouseEvent, { rowData, rowIndex, tableData, }: { rowData: T; rowIndex: number; tableData: T[]; }) => void; export type RowClassNameFn = (rowData: T, rowIndex: number, tableData: T[]) => string; export type CompareFunction = (a: T, b: T) => number; export type HeaderSortable = boolean | CompareFunction; export interface Column { key: string; text: string; invisible: boolean; sortable: HeaderSortable; filterable: boolean; isImg: boolean; transform?: TransformFn; } export type Headers = Record>; export type Sorting = { key: string; dir: string; }; export interface Highlight { first: string | undefined; highlight: string | undefined; last: string | undefined; value: string; } export interface RenderOptions { children?: ReactNode; content?: ReactNode; parseBool?: boolean | ParseBool; } export type KeyResolverFn = (args: T) => T[]; export interface FetchDataOptions { dataKey?: string; dataKeyResolver?: KeyResolverFn; options?: RequestInit; } export declare const head: ([first]: T[]) => T; export declare const isString: (str: unknown) => boolean; export declare const isArray: (obj: T) => boolean; export declare const isObject: (obj: T) => boolean; export declare const isEmpty: (obj: unknown[] | T) => boolean; export declare const isFunction: (fn: (...args: unknown[]) => unknown) => boolean; export declare const isNumber: (num: T) => boolean; export declare const isUndefined: (undef: T) => boolean; export declare const capitalize: (str: string) => string; export declare const sortBy: (arr: T[], key: string, compareFn: HeaderSortable) => T[]; export declare const cleanLonelyInt: (val: string) => boolean; export declare const errorPrint: (...args: unknown[]) => void; export declare function generatePagination(activePage?: number, totalPages?: number, margin?: number): { active: boolean; value: number | undefined; text: string; }[]; export declare function getNestedObject(nestedObj: T, pathArr: string[]): unknown; export declare function fetchData(data: string | unknown[], { dataKey, dataKeyResolver, options, }?: FetchDataOptions): Promise; export declare function capitalizeAll(arr: string[]): string; export declare function parseHeader(val: string): string; export declare function valueOrDefault(value: T, defaultValue: T): T; export declare function columnObject(key: string, headers?: Headers): Column; export declare function getSampleElement(data?: T[], dataSampling?: number): T; export declare function parseDataForColumns(data?: T[], headers?: Headers, orderedHeaders?: string[], hideUnordered?: boolean, dataSampling?: number): Column[]; export declare function parseDataForRows(data?: T[]): T[]; export declare function filterRowsByValue(value: string, rows: T[], colProperties: Headers): T[]; export declare function filterRows(value: string, rows: T[], colProperties: Headers): T[]; export declare function sliceRowsPerPage(rows: T[], currentPage: number, perPage: number): T[]; export declare function sortData(filterValue: string, colProperties: Headers, sorting: Sorting, data: T[]): T[]; export declare function isDataUrl(url: unknown): boolean; export declare function isImage(url: unknown): boolean; export declare function highlightValueParts(value: string, filterValue: string): Highlight; export declare function getRenderValue({ children, content, parseBool, }?: RenderOptions): string;