import { Tag } from '@malloydata/malloy-tag';
import { FieldBase } from './base';
import { Field } from '.';
import { ArrayFieldInfo, RecordFieldInfo, RepeatedRecordFieldInfo, SortableField } from '../types';
export declare class ArrayField extends FieldBase {
    readonly field: ArrayFieldInfo;
    readonly maxUniqueFieldValueCounts: Map<string, number>;
    protected _elementField?: Field;
    constructor(field: ArrayFieldInfo, parent: Field | undefined, skipTagParsing?: boolean);
    /**
     * Lazy getter for elementField to optimize field creation.
     *
     * Performance optimization: For RepeatedRecordField, this getter is overridden
     * to return the nestedRecordField, preventing duplicate field creation.
     * For regular ArrayField instances, the element field is created on-demand.
     */
    get elementField(): Field;
    get isDrillable(): boolean;
}
export declare class RepeatedRecordField extends ArrayField {
    readonly field: RepeatedRecordFieldInfo;
    readonly fields: Field[];
    readonly fieldsByName: Record<string, Field>;
    maxRecordCount: number;
    readonly nestedRecordField: RecordField;
    constructor(field: RepeatedRecordFieldInfo, parent: Field | undefined);
    /**
     * Override elementField to return the shared nestedRecordField.
     *
     * This prevents duplicate field creation that would occur if we let
     * ArrayField create its own elementField. Since RepeatedRecordField
     * already knows its elements are records, we can reuse the nestedRecordField.
     */
    get elementField(): Field;
    fieldAtPath(path: string[]): Field;
    registerRecordCount(count: number): void;
    registerValueSetSize(fieldName: string, size: number): void;
    private _fieldsWithOrder;
    get fieldsWithOrder(): SortableField[];
}
export declare class RootField extends RepeatedRecordField {
    readonly field: RepeatedRecordFieldInfo;
    readonly modelTag: Tag;
    readonly queryTimezone: string | undefined;
    constructor(field: RepeatedRecordFieldInfo, metadata: {
        modelTag: Tag;
        queryTimezone: string | undefined;
    });
}
export declare class RecordField extends FieldBase {
    readonly field: RecordFieldInfo;
    fields: Field[];
    fieldsByName: Record<string, Field>;
    readonly maxUniqueFieldValueCounts: Map<string, number>;
    constructor(field: RecordFieldInfo, parent: Field | undefined, 
    /**
     * Optional configuration for performance optimizations.
     * - fields: Pre-created fields to share (avoids duplicate field creation)
     * - skipTagParsing: Skip metadata tag parsing for synthetic fields
     */
    options?: {
        fields?: Field[];
        skipTagParsing?: boolean;
    });
    fieldAtPath(path: string[]): Field;
    private _fieldsWithOrder;
    get fieldsWithOrder(): SortableField[];
}
