/** @module @airtable/blocks/models: View */ /** */
import Sdk from '../sdk';
import { FieldId } from '../types/field';
import { NormalizedGroupLevel } from '../types/airtable_interface';
import { ObjectValues } from '../private_utils';
import AbstractModelWithAsyncData from './abstract_model_with_async_data';
import ViewDataStore from './view_data_store';
import View from './view';
import Field from './field';
declare const WatchableViewMetadataKeys: {
    allFields: "allFields";
    visibleFields: "visibleFields";
    isDataLoaded: "isDataLoaded";
    groupLevels: "groupLevels";
};
/**
 * A key in {@link ViewMetadataQueryResult} that can be watched.
 * - `allFields`
 * - `visibleFields`
 * - `isDataLoaded`
 */
declare type WatchableViewMetadataKey = ObjectValues<typeof WatchableViewMetadataKeys>;
/** @hidden */
interface ViewMetadata {
    visibleFieldIds: Array<FieldId> | null;
    allFieldIds: Array<FieldId> | null;
    groupLevels: Array<NormalizedGroupLevel> | null;
}
/**
 * @hidden
 */
interface GroupLevel {
    field: Field;
    fieldId: FieldId;
    direction: 'asc' | 'desc';
}
/**
 * @hidden
 */
export declare type GroupLevels = Array<GroupLevel>;
/**
 * Contains information about a view that isn't loaded by default e.g. field order and visible fields.
 *
 * In a React component, we recommend using {@link useViewMetadata} instead.
 *
 * @example
 * ```js
 * async function loadMetadataForViewAsync(view) {
 *     const viewMetadata = view.selectMetadata();
 *     await viewMetadata.loadDataAsync();
 *
 *     console.log(viewMetadata.visibleFields);
 *     // => [Field, Field, Field]
 *
 *     console.log(viewMetadata.allFields);
 *     // => [Field, Field, Field, Field, Field]
 *
 *     viewMetadata.unloadData();
 * }
 * ```
 * @docsPath models/query results/ViewMetadataQueryResult
 */
declare class ViewMetadataQueryResult extends AbstractModelWithAsyncData<ViewMetadata, WatchableViewMetadataKey> {
    /** @internal */
    static _className: string;
    /** @internal */
    static _isWatchableKey(key: string): boolean;
    /** @internal */
    static _shouldLoadDataForKey(key: WatchableViewMetadataKey): boolean;
    /** */
    readonly parentView: View;
    /** @internal */
    readonly _viewDataStore: ViewDataStore;
    /** @internal */
    constructor(sdk: Sdk, parentView: View, viewDataStore: ViewDataStore);
    /** @internal */
    get __poolKey(): string;
    /** @internal */
    get _dataOrNullIfDeleted(): ViewMetadata | null;
    /** @internal */
    _onChangeIsDataLoaded(): void;
    /** @internal */
    _loadDataAsync(): Promise<Array<WatchableViewMetadataKey>>;
    /** @internal */
    _unloadData(): void;
    /** @internal */
    _onVisibleFieldIdsChange: () => void;
    /** @internal */
    _onAllFieldIdsChange: () => void;
    /** @internal */
    _onGroupLevelsChange: () => void;
    /**
     * Returns every field in the table in the order they appear in this view. Watchable.
     */
    get allFields(): Array<Field>;
    /**
     * Returns every field visible in this view. Watchable.
     */
    get visibleFields(): Array<Field>;
    /**
     * Returns group levels for this view. Watchable.
     *
     * @hidden
     */
    get groupLevels(): GroupLevels | null;
}
export default ViewMetadataQueryResult;
