/** @module @airtable/blocks/models: RecordQueryResult */ /** */
import { FieldId } from '../types/field';
import Sdk from '../sdk';
import { FlowAnyFunction, FlowAnyObject } from '../private_utils';
import { RecordId } from '../types/record';
import RecordQueryResult, { WatchableRecordQueryResultKey, NormalizedRecordQueryResultOpts } from './record_query_result';
import TableOrViewQueryResult from './table_or_view_query_result';
import Table from './table';
import Field from './field';
import Record from './record';
import RecordStore from './record_store';
export declare const getLinkedTableId: (field: Field) => string;
/** internal */
interface LinkedRecordsQueryResultData {
}
/**
 * Represents a set of records from a LinkedRecord cell value. See {@link RecordQueryResult} for main
 * documentation.
 *
 * Do not instantiate. You can get instances of this class by calling
 * `record.selectLinkedRecordsFromCell`.
 *
 * @docsPath models/query results/LinkedRecordsQueryResult
 */
declare class LinkedRecordsQueryResult extends RecordQueryResult<LinkedRecordsQueryResultData> {
    /** @internal */
    static _className: string;
    /** @internal */
    _record: Record;
    /** @internal */
    _field: Field;
    /** @internal */
    _linkedTable: Table;
    /** @internal */
    _originRecordStore: RecordStore;
    /** @internal */
    _linkedRecordStore: RecordStore;
    /** @internal */
    _linkedQueryResult: TableOrViewQueryResult;
    /** @internal */
    _isValid: boolean;
    /** @internal */
    _computedRecordIdsSet: {
        [key: string]: true | void;
    } | null;
    /** @internal */
    _computedFilteredSortedRecordIds: Array<string> | null;
    /** @internal */
    _cellValueChangeHandlerByFieldId: {
        [key: string]: (arg1: TableOrViewQueryResult, key: string, recordIds: Array<RecordId> | void) => void;
    };
    /** @internal */
    constructor(record: Record, field: Field, normalizedOpts: NormalizedRecordQueryResultOpts, sdk: Sdk);
    /**
     * Is the query result currently valid? This value always starts as 'true',
     * but can become false if the record from which this result was created is
     * deleted, if the field is deleted, if the field config changes to link to
     * a different table, or if the field config changes to link to a type
     * other than MULTIPLE_RECORD_LINKS. Once `isValid` has become false, it
     * will never become true again. Many fields will throw on attempting to
     * access them, and watches will no longer fire.
     */
    get isValid(): boolean;
    /**
     * The table that records in this RecordQueryResult are part of
     *
     * @internal (since we may not be able to return parent model instances in the immutable models world)
     */
    get parentTable(): Table;
    /**
     * Ordered array of all the linked record ids. Watchable.
     */
    get recordIds(): Array<string>;
    /**
     * Ordered array of all the linked records. Watchable.
     */
    get records(): Array<Record>;
    /**
     * The fields that were used to create this LinkedRecordsQueryResult.
     */
    get fields(): Array<Field> | null;
    /** @inheritdoc */
    watch(keys: WatchableRecordQueryResultKey | ReadonlyArray<WatchableRecordQueryResultKey>, callback: FlowAnyFunction, context?: FlowAnyObject | null): Array<WatchableRecordQueryResultKey>;
    /** @inheritdoc */
    unwatch(keys: WatchableRecordQueryResultKey | ReadonlyArray<WatchableRecordQueryResultKey>, callback: FlowAnyFunction, context?: FlowAnyObject | null): Array<WatchableRecordQueryResultKey>;
    /** @inheritdoc */
    loadDataAsync(): Promise<void>;
    /** @internal */
    _loadDataAsync(): Promise<Array<WatchableRecordQueryResultKey>>;
    /** @internal */
    _unloadData(): void;
    /**
     * the key used to identify this query result in ObjectPool
     *
     * @hidden
     */
    get __poolKey(): string;
    /** @internal */
    get _cellValuesWatchCount(): number;
    /** @internal */
    _watchLinkedQueryCellValuesIfNeededAfterWatch(): void;
    /** @internal */
    _unwatchLinkedQueryCellValuesIfPossibleBeforeUnwatch(): void;
    /** @internal */
    get _cellValueWatchCountByFieldId(): Readonly<{
        [key: string]: number;
    }>;
    /** @internal */
    _watchLinkedQueryCellValuesInFieldIfNeededAfterWatch(fieldId: string): void;
    /** @internal */
    _unwatchLinkedQueryCellValuesInFieldIfPossibleBeforeUnwatch(fieldId: string): void;
    /** @internal */
    _watchOrigin(): void;
    /** @internal */
    _unwatchOrigin(): void;
    /** @internal */
    _watchLinkedQueryResult(): void;
    /** @internal */
    _unwatchLinkedQueryResult(): void;
    /** @internal */
    _watchLinkedQueryCellValues(): void;
    /** @internal */
    _unwatchLinkedQueryCellValues(): void;
    /** @internal */
    _watchLinkedQueryCellValuesInField(fieldId: string): void;
    /** @internal */
    _unwatchLinkedQueryCellValuesInField(fieldId: string): void;
    /** @internal */
    _onLinkedRecordIdsChange(): void;
    /**
     * This model doesn't use the `_data` computed property it inherits from
     * AbstractModel. It implements the following method only so that internal
     * checks for model deletion behave appropriately (the data itself is
     * inconsequential).
     *
     * @internal
     */
    get _dataOrNullIfDeleted(): LinkedRecordsQueryResultData | null;
    /** @internal */
    _onLinkedCellValuesChange(queryResult: TableOrViewQueryResult, key: string, changes?: {
        fieldIds?: Array<FieldId>;
        recordIds?: Array<RecordId>;
    }): void;
    /** @internal */
    _getOnLinkedCellValuesInFieldChange(fieldId: string): (arg1: TableOrViewQueryResult, key: string, recordIds: Array<RecordId> | void) => void;
    /** @internal */
    _onOriginCellValueChange(): void;
    /** @internal */
    _onOriginRecordsChange(): void;
    /** @internal */
    _onOriginFieldsChange(): void;
    /** @internal */
    _onOriginFieldConfigChange(): void;
    /** @internal */
    _invalidateQueryResult(): void;
    /** @internal */
    _invalidateComputedData(): void;
    /** @internal */
    _generateComputedDataIfNeeded(): void;
    /** @internal */
    _generateComputedData(): void;
    /** @internal */
    _getOrGenerateRecordIdsSet(): {
        [key: string]: true | void;
    };
}
export default LinkedRecordsQueryResult;
