/**
 * DataGrid Molecule
 *
 * A simplified, schema-driven card grid for iterating over entity data.
 * Extracted from the CardGrid organism with all complexity removed:
 * no built-in search, sort, filter, pagination, selection, or bulk actions.
 *
 * Accepts `fields` config for per-field rendering control (icon, variant, format)
 * and `itemActions` for per-item event bus wiring.
 *
 * Uses atoms only internally: Box, VStack, HStack, Typography, Badge, Button, Icon.
 */
import React from 'react';
import type { EntityRow, EventKey } from '@almadar/core';
export interface DataGridField {
    /** Entity field name (dot-notation supported) */
    name: string;
    /** Display label (auto-generated from name if omitted) */
    label?: string;
    /** Lucide icon name to show beside the field */
    icon?: string;
    /** Rendering variant: 'h3' for title, 'body' for text, 'caption' for small,
     *  'badge' for status badge, 'progress' for progress display */
    variant?: 'h3' | 'h4' | 'body' | 'caption' | 'badge' | 'small' | 'progress';
    /** Optional format function name: 'date', 'currency', 'number', 'boolean' */
    format?: 'date' | 'currency' | 'number' | 'boolean' | 'percent';
    /**
     * Per-value color mapping for `variant: 'badge'`. Keys are exact field
     * values; values are Badge variant names. Accepts the shadcn-style
     * `destructive` alias and normalises it to `danger` at render time. When
     * present, takes precedence over the built-in `statusVariant` heuristic.
     *
     * Example:
     *   colorMap: { active: 'success', pending: 'warning', failed: 'destructive' }
     */
    colorMap?: Record<string, string>;
}
export interface DataGridItemAction {
    /** Button label */
    label: string;
    /** Event name to emit (dispatched as UI:{event} with { row: itemData }) */
    event: EventKey;
    /** Lucide icon name */
    icon?: string;
    /** Button variant */
    variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
}
export interface DataGridProps<T extends EntityRow = EntityRow> {
    /**
     * Schema entity data — single record or collection, typed against
     * `@almadar/core`'s `EntityRow` so the narrow type declared on the
     * emitting trait's `Event { data : [X] }` flows through to the prop
     * without widening. The generic `T` lets consumers pass a narrower
     * entity (e.g. `CartItem`) and have the `children` render function
     * receive cards typed to that exact shape.
     */
    entity: T | readonly T[];
    /**
     * Field definitions for rendering each card. The pattern contract in
     * `@almadar/patterns` documents `columns` as the wire-format alias the
     * compiler emits — both names resolve to the same shape here. Pass either.
     */
    fields?: readonly DataGridField[];
    /** Alias for `fields` — the compiler emits `columns` for field defs. */
    columns?: readonly DataGridField[];
    /** Per-item action buttons */
    itemActions?: readonly DataGridItemAction[];
    /** Number of columns (uses auto-fit if omitted) */
    cols?: 1 | 2 | 3 | 4 | 5 | 6;
    /** Gap between cards */
    gap?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
    /** Minimum card width in pixels (used when cols is not set, default 280) */
    minCardWidth?: number;
    /** Additional CSS classes */
    className?: string;
    /** Loading state */
    isLoading?: boolean;
    /** Error state */
    error?: Error | null;
    /** Entity field name containing an image URL for card thumbnails */
    imageField?: string;
    /** Enable multi-select with checkboxes */
    selectable?: boolean;
    /** Selection change event name (emits UI:{selectionEvent} with { selectedIds: string[] }) */
    selectionEvent?: EventKey;
    /** Enable infinite scroll loading */
    infiniteScroll?: boolean;
    /** Event emitted when more items needed: UI:{loadMoreEvent} */
    loadMoreEvent?: EventKey;
    /** Whether more items are available for infinite scroll */
    hasMore?: boolean;
    /** Render prop for custom per-card content, typed to the grid's entity
     *  shape `T`. When provided, `fields` and `itemActions` are ignored. */
    children?: (item: T, index: number) => React.ReactNode;
    /**
     * Per-item render function (schema-level alias for children render prop).
     * In .orb schemas: ["fn", "item", { pattern tree with @item.field bindings }]
     * The compiler converts this to the children render prop.
     * @deprecated Use children render prop in React code. This prop exists for pattern registry sync.
     */
    renderItem?: (item: T, index: number) => React.ReactNode;
    /** Max items to show before "Show More" button. Defaults to 0 (disabled). */
    pageSize?: number;
}
export declare function DataGrid<T extends EntityRow = EntityRow>({ entity, fields, columns, itemActions, cols, gap, minCardWidth, className, isLoading, error, imageField, selectable, selectionEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, renderItem: schemaRenderItem, }: DataGridProps<T>): import("react/jsx-runtime").JSX.Element;
export declare namespace DataGrid {
    var displayName: string;
}
