/**
 * 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';
import { type DataDndProps } from './useDataDnd';
import type { UiError } from '../atoms/types';
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 extends DataDndProps {
    /**
     * Schema entity data — the collection of rows to render. pattern-sync tags
     * it `kind:"entity", cardinality:"collection"` so consumers bind the domain
     * entity without name-matching the prop.
     */
    entity: readonly EntityRow[];
    /**
     * 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[];
    /** Max inline primary action buttons before the rest collapse into a "⋯" overflow menu. Omit = all inline. */
    maxInlineActions?: number;
    /** Lay items in a single horizontally-scrolling row (kanban columns) sized to `minCardWidth` instead of a wrapping grid. */
    scrollX?: boolean;
    /** 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?: UiError | 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. When provided, `fields` and
     *  `itemActions` are ignored. */
    children?: (item: EntityRow, 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: EntityRow, index: number) => React.ReactNode;
    /** Max items to show before "Show More" button. Defaults to 0 (disabled). */
    pageSize?: number;
    /**
     * Layer 2 visual treatment — mirrors the `entity-table` look enum so
     * data-grid / data-list / entity-table share one knob name from authors.
     */
    look?: "dense" | "spacious" | "striped" | "borderless" | "card-rows";
}
export declare function DataGrid({ entity, fields, columns, itemActions, maxInlineActions, scrollX, cols, gap, minCardWidth, className, isLoading, error, imageField, selectable, selectionEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, renderItem: schemaRenderItem, dragGroup, accepts, sortable, dropEvent, reorderEvent, positionEvent, dndItemIdField, dndRoot, look, }: DataGridProps): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
export declare namespace DataGrid {
    var displayName: string;
}
