import { RelationshipFilterConfig } from "./relationship-filters";
import { ColumnCategory, ColumnDataType, FilterOperator, RenderMode } from "./render-mode-mapper";
/**
 * Filter configuration for an injected column.
 */
export interface ComputedColumnFilter {
    enabled: boolean;
    /**
     * Useful for customizations where you want to control the operators that are available for the filter.
     */
    operators?: FilterOperator[];
    /**
     * Relationship dropdown filter. `filter_key` overrides the query-param key
     * the filter posts (e.g. `"location_id"`); options are fetched from
     * `endpoint`. Omit for a plain scalar/enum filter.
     */
    relationship?: RelationshipFilterConfig;
    enumValues?: string[];
}
/**
 * Definition of a column injected for an entity, in addition to the columns
 * discovered from its schema. Can be a computed DISPLAY column (provide
 * `renderMode` + `requiredFields`), a FILTER-only column (set `context:
 * "filter"` + `filter`), or both.
 */
export interface ComputedColumnDefinition {
    /**
     * Unique identifier for the column (e.g., "customer_display").
     */
    id: string;
    /**
     * Display name for the column.
     */
    name: string;
    /**
     * Render mode/type for the column. Required for display columns; omit for
     * filter-only columns.
     */
    renderMode?: RenderMode;
    /**
     * Fields required to render this column. Omit for filter-only columns.
     */
    requiredFields?: string[];
    /**
     * Optional fields that enhance the rendering.
     */
    optionalFields?: string[];
    /**
     * Whether this column should be visible by default.
     */
    defaultVisible?: boolean;
    /**
     * Description of the column.
     */
    description?: string;
    /**
     * Category for grouping columns (e.g., "relationship", "metadata", "computed").
     */
    category?: ColumnCategory;
    /**
     * Metadata for the column.
     */
    metadata?: Record<string, any>;
    /**
     * Column context: "display" (default), "filter" (filter-only, not rendered),
     * or "both".
     */
    context?: "display" | "filter" | "both";
    /**
     * Filter configuration. When provided with `enabled: true`, the column is
     * filterable (used for injecting filters the schema doesn't expose, e.g. a
     * field inside an array relationship).
     */
    filter?: ComputedColumnFilter;
    /**
     * Column data type (default "string").
     */
    dataType?: ColumnDataType;
    /**
     * Whether the column is sortable (default false).
     */
    sortable?: boolean;
}
/**
 * Built-in computed columns, keyed by the entity they belong to.
 */
export declare const BUILTIN_COMPUTED_COLUMNS: Record<string, ComputedColumnDefinition[]>;
/**
 * Registry for computed columns.
 * Allows registration of custom computed columns.
 */
export declare class ComputedColumnRegistry {
    private columns;
    constructor();
    /**
     * Register computed columns for an entity. Columns are appended to any
     * already registered for the entity; a column sharing an existing `id`
     * replaces it, keeping registration idempotent.
     */
    register(entity: string, columns: ComputedColumnDefinition[]): void;
    /**
     * Get all computed columns for an entity.
     */
    get(entityName: string): ComputedColumnDefinition[];
}
/**
 * Get the computed column registry singleton.
 */
export declare function getComputedColumnRegistry(): ComputedColumnRegistry;
//# sourceMappingURL=computed-columns.d.ts.map