import { PipeTransform } from '@angular/core'; import { StatusBadgeColor } from '../status-badge/status-badge.component'; /** An icon rendered next to a column header, with its own optional tooltip. */ export interface TableHeaderIcon { icon: string; tooltip?: string; } export interface TableColumn { def: string; header: string; /** * Icon(s) rendered after the header label. A single icon may be passed * directly; pass a list to stack several, each with its own tooltip. */ headerIcon?: TableHeaderIcon | TableHeaderIcon[]; /** * Formatting applied to the cell value: a built-in name (`'date'` or * `'currency'`) or any `PipeTransform` instance. The overflow tooltip repeats * the formatted text, so both always agree. */ pipe?: string | PipeTransform; /** Arguments forwarded to {@link pipe}, e.g. `['dd/MM/yyyy']` for `'date'`. */ pipeArgs?: any[]; routerLink?: string; toggle?: boolean; statusCard?: boolean; statusCardFunction?: (element: any) => StatusBadgeColor; queryParams?: any; fixedText?: string; actions?: Action[]; checkbox?: boolean; } interface Action { icon: string; handler: (element: any) => void; color?: string; label?: string; condition?: (element: any) => boolean; } export {};