import { PzInfoHintContent } from '../../Popups/PzInfoHint';
export type PzTableRowId = string | number;
export type PzTablePathValue<TSource, TPath extends string> = string extends TPath ? unknown : TPath extends `${infer Head}.${infer Tail}` ? Head extends keyof NonNullable<TSource> ? PzTablePathValue<NonNullable<TSource>[Head], Tail> : unknown : TPath extends keyof NonNullable<TSource> ? NonNullable<TSource>[TPath] : unknown;
export interface PzTableColumn<TKey extends string = string> {
    id: string;
    name: string;
    key: TKey;
    colWidth?: number;
    mobileName?: string;
    infoContent?: PzInfoHintContent[];
    isContentHtml?: boolean;
}
export type PzTableRow = Record<string, unknown> & {
    id?: PzTableRowId;
};
export interface PzTableCellSlotProps<TRow extends object = PzTableRow, TKey extends string = string> {
    data: TRow;
    column: PzTableColumn<TKey>;
    value: PzTablePathValue<TRow, TKey> | string;
}
export type PzTableSlots<TRow extends object = PzTableRow, TKey extends string = Extract<keyof TRow, string>> = {
    [K in TKey]?: (props: PzTableCellSlotProps<TRow, K>) => unknown;
} & {
    [name: string]: ((props: PzTableCellSlotProps<TRow>) => unknown) | undefined;
};
export interface PzTableProps<TRow extends object = PzTableRow, TKey extends string = string> {
    config: PzTableColumn<TKey>[];
    data: TRow[];
    defaultValue?: string;
    visibleHeader?: boolean;
    isBoldFirstColumn?: boolean;
}
export interface PzTableHeadProps {
    column: PzTableColumn;
}
export interface PzTableDataProps<TRow extends object = PzTableRow, TKey extends string = string> {
    column: PzTableColumn<TKey>;
    data?: TRow;
    defaultValue: string;
    isBold?: boolean;
}
