import { type IconName } from '../../../Icon';
import type { TablePlugin } from '../../types';
/**
 * Semantic status colors, resolved to the design system's icon color tokens.
 * Prefer these over raw CSS so status colors stay consistent with the theme.
 */
export type TableRowStatusColor = 'accent' | 'success' | 'error' | 'warning' | 'red' | 'orange' | 'green' | 'yellow' | 'blue' | 'gray';
/**
 * A row's status indicator. `color` accepts a semantic status color
 * (mapped to a theme token) or any raw CSS color string as an escape hatch.
 * By default the plugin renders a colored status dot. Provide `icon` to signal
 * status by shape as well as color, which is more accessible when several
 * statuses coexist. `label` is required so the status is never conveyed by
 * color alone — it names the indicator for assistive technology and shows on
 * hover. Return `null` for rows with no status.
 */
export interface TableRowStatus {
    /** Semantic status color (preferred) or a raw CSS color string. */
    color: TableRowStatusColor | (string & {});
    /** Optional icon rendered as the signifier instead of the dot (shape as an a11y differentiator). */
    icon?: IconName;
    /**
     * Accessible name for the status, announced to assistive technology and
     * shown in a tooltip on hover. Required: a status must never be conveyed by
     * color alone.
     */
    label: string;
}
/** Configuration for {@link useTableRowStatus}. */
export interface UseTableRowStatusConfig<T extends Record<string, unknown>> {
    /**
     * Derive the status indicator for a row. Return `null` for no indicator.
     * Memoize with `useCallback` for a stable plugin identity across renders.
     *
     * @example
     * ```
     * getStatus: row =>
     *   row.hasError ? {color: 'error', icon: 'error', label: 'Error'} : null
     * ```
     */
    getStatus: (item: T) => TableRowStatus | null;
}
/**
 * Returns a {@link TablePlugin} that prepends a narrow column signaling per-row
 * status: a colored status dot by default, or an icon when `icon` is provided
 * (shape + color is more accessible than color alone).
 *
 * @example
 * ```
 * const rowStatus = useTableRowStatus<Row>({
 *   getStatus: row =>
 *     row.state === 'error'
 *       ? {color: 'error', icon: 'error', label: 'Error'}
 *       : null,
 * });
 * <Table data={data} columns={columns} idKey="id" plugins={{rowStatus}} />;
 * ```
 */
export declare function useTableRowStatus<T extends Record<string, unknown>>(config: UseTableRowStatusConfig<T>): TablePlugin<T>;
//# sourceMappingURL=useTableRowStatus.d.ts.map