/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import type { IIdCompressor } from "@fluidframework/id-compressor";
import { type StoredSchemaCollection, type TreeFieldStoredSchema, type TreeNodeSchemaIdentifier, type SchemaPolicy } from "../../../core/index.js";
import type { IncrementalEncoder } from "./codecs.js";
import { EncoderContext, type FieldEncoder, type FieldEncodeBuilder, type NodeEncodeBuilder } from "./compressedEncode.js";
import type { FieldBatch } from "./fieldBatch.js";
import { type EncodedFieldBatchV1, type EncodedFieldBatchV2, FieldBatchFormatVersion } from "./format/index.js";
import { NodeShapeBasedEncoder } from "./nodeEncoder.js";
/**
 * Encode data from `fieldBatch` in into an `EncodedChunk` using {@link FieldBatchFormatVersion.v1}.
 * @remarks See {@link schemaCompressedEncode} for more details.
 * This version does not support incremental encoding.
 */
export declare function schemaCompressedEncodeV1(schema: StoredSchemaCollection, policy: SchemaPolicy, fieldBatch: FieldBatch, idCompressor: IIdCompressor): EncodedFieldBatchV1;
/**
 * Encode data from `fieldBatch` in into an `EncodedChunk` using {@link FieldBatchFormatVersion.v2}.
 * @remarks See {@link schemaCompressedEncode} for more details.
 * Incremental encoding is supported from this version onwards.
 */
export declare function schemaCompressedEncodeV2(schema: StoredSchemaCollection, policy: SchemaPolicy, fieldBatch: FieldBatch, idCompressor: IIdCompressor, incrementalEncoder: IncrementalEncoder | undefined): EncodedFieldBatchV2;
export declare function buildContext(storedSchema: StoredSchemaCollection, policy: SchemaPolicy, idCompressor: IIdCompressor, incrementalEncoder: IncrementalEncoder | undefined, version: FieldBatchFormatVersion): EncoderContext;
/**
 * Selects an encoder to use to encode fields.
 */
export declare function getFieldEncoder(nodeBuilder: NodeEncodeBuilder, field: TreeFieldStoredSchema, context: EncoderContext, storedSchema: StoredSchemaCollection): FieldEncoder;
/**
 * Selects an encoder to use to encode nodes.
 */
export declare function getNodeEncoder(fieldBuilder: FieldEncodeBuilder, storedSchema: StoredSchemaCollection, schemaName: TreeNodeSchemaIdentifier, incrementalEncoder?: IncrementalEncoder): NodeShapeBasedEncoder;
//# sourceMappingURL=schemaBasedEncode.d.ts.map