/**
 * TableView Molecule
 *
 * A simplified, schema-driven column table for iterating over entity data.
 * The table-shaped sibling of DataList (rows) and DataGrid (cards): same
 * `entity` + `columns`/`fields` + `itemActions` contract and the same
 * `useDataDnd` drag-to-reorder machinery, rendered as aligned columns with a
 * header. All complexity is opt-in: selection, drag-reorder, and per-column
 * sorting are each enabled by their own props and emit via the event bus.
 *
 * Uses atoms only internally: Box, VStack, HStack, Typography, Badge, Button,
 * Icon, Checkbox, Divider.
 */
import React from 'react';
import type { EntityRow, EventKey, EntityCollection } from '@almadar/core';
import { type DataDndProps } from './useDataDnd';
export interface TableViewColumn {
    /** Stable column key (React key + default value lookup). */
    key: string;
    /** Entity field to read (dot-notation ok). Defaults to `key`. */
    field?: string;
    /** Header cell text. Falls back to `label`, then a humanized `key`. */
    header?: string;
    /** Accessibility / fallback label. */
    label?: string;
    /** CSS grid track size for this column (e.g. "7rem", "minmax(10rem, 1.5fr)",
     *  "1fr"). Shared across header + body so columns align. Defaults to
     *  "minmax(0, 1fr)" (equal flexible share). */
    width?: string;
    /** Horizontal alignment of the column's cells. */
    align?: 'left' | 'center' | 'right';
    /** Extra cell classes (e.g. "font-mono tabular-nums truncate"). */
    className?: string;
    /** Render the cell value with the given font weight. */
    weight?: 'normal' | 'medium' | 'semibold';
    /** Value formatting hint. `badge` renders a status Badge. */
    format?: 'badge' | 'date' | 'currency' | 'number' | 'percent' | 'boolean';
    /** Lucide icon shown before the header label. */
    icon?: string;
    /** Allow click-to-sort on this column's header (emits `sortEvent`). */
    sortable?: boolean;
}
export interface TableViewItemAction {
    /** Button label. */
    label: string;
    /** Event name to emit (dispatched as UI:{event} with { id, row }). */
    event: EventKey;
    /** Lucide icon name. */
    icon?: string;
    /** Button variant. */
    variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
}
export interface TableViewProps<T extends EntityRow = EntityRow> extends DataDndProps {
    /** Schema entity data — single record or collection. */
    entity: EntityCollection<T>;
    /** Column definitions. The compiler emits `columns`; `fields` is the alias. */
    columns?: readonly TableViewColumn[];
    /** Alias for `columns`. */
    fields?: readonly TableViewColumn[];
    /** Per-row action buttons (trailing column). */
    itemActions?: readonly TableViewItemAction[];
    /** Max inline action buttons before the rest collapse into a "⋯" overflow menu. Omit = all inline. */
    maxInlineActions?: number;
    /** Render a leading checkbox column. Selection changes emit `selectEvent`. */
    selectable?: boolean;
    /** Event emitted on selection change: UI:{selectEvent} with { ids, rows }. */
    selectEvent?: EventKey;
    /** Currently-selected ids (controlled). Falls back to local state when omitted. */
    selectedIds?: readonly string[];
    /** Event emitted on sortable-header click: UI:{sortEvent} with { column, direction }. */
    sortEvent?: EventKey;
    /** Current sort column (display hint for the active header arrow). */
    sortColumn?: string;
    /** Current sort direction (display hint). */
    sortDirection?: 'asc' | 'desc';
    /** Additional CSS classes applied to the table root. */
    className?: string;
    /** Message shown when there are no rows. */
    emptyMessage?: string;
    /** Loading state. */
    isLoading?: boolean;
    /** Error state. */
    error?: Error | null;
    /** Group rows under section headers by a field value. */
    groupBy?: string;
    /** Max rows before a "Show More" button. Defaults to 0 (show all). */
    pageSize?: number;
    /**
     * Custom per-row render. When provided, the whole row content is delegated
     * to this function (columns are ignored for the body; the header still
     * renders). Mirrors DataList's children render prop.
     */
    children?: (item: T, index: number) => React.ReactNode;
    /**
     * Per-row render function (schema alias). In .orb: ["fn","item",{...}].
     * The compiler converts this to the children render prop.
     * @deprecated Use children in React code; exists for pattern registry sync.
     */
    renderItem?: (item: T, index: number) => React.ReactNode;
    /**
     * Layer 2 visual treatment — mirrors the data-list / entity-table look enum
     * so authors share one knob name across row renderers.
     */
    look?: 'dense' | 'spacious' | 'striped' | 'borderless' | 'bordered';
}
export declare function TableView<T extends EntityRow = EntityRow>({ entity, columns, fields, itemActions, maxInlineActions, selectable, selectEvent, selectedIds, sortEvent, sortColumn, sortDirection, className, emptyMessage, isLoading, error, groupBy, pageSize, children, renderItem: _schemaRenderItem, look, dragGroup, accepts, sortable, dropEvent, reorderEvent, positionEvent, dndItemIdField, dndRoot, }: TableViewProps<T>): import("react/jsx-runtime").JSX.Element;
export declare namespace TableView {
    var displayName: string;
}
