/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { type FieldHasDefault, type ImplicitAllowedTypes, type InsertableTreeNodeFromImplicitAllowedTypes, type NodeKind, type SchemaFactoryBeta, type ScopedSchemaName, type TreeNode, type TreeNodeFromImplicitAllowedTypes, type TreeNodeSchemaClass, type WithType, type TreeFieldFromImplicitField, type InsertableTreeFieldFromImplicitField, type InternalTreeNode, SchemaFactory, type ImplicitFieldSchema, type TreeRecordNode, TreeNodeSchemaCore, FieldKind } from "./simple-tree/index.js";
/**
 * A row in a table.
 * @typeParam TCellSchema - The type of the cells in the {@link TableSchema.Table}.
 * @typeParam TPropsSchema - Additional properties to associate with the row.
 * @privateRemarks Private counterpart to the {@link TableSchema.Row}.
 * Exposes internal properties needed for table operations (publicly exposed via {@link TableSchema.Table}).
 * @sealed
 */
export interface RowPrivate<TCellSchema extends ImplicitAllowedTypes, TPropsSchema extends ImplicitFieldSchema = ImplicitFieldSchema> extends TableSchema.Row<TCellSchema, TPropsSchema> {
    /**
     * The row's cells.
     * @remarks This is a user-defined schema that can be used to store additional information about the row.
     * @privateRemarks
     * Note: these docs are duplicated on the inline type definitions in {@link System_TableSchema.createRowSchema}.
     * If you update the docs here, please also update the inline type definitions.
     */
    readonly cells: TreeRecordNode<TCellSchema>;
}
/**
 * Not intended for use outside of this package.
 *
 * @privateRemarks
 * This namespace is a collection of internal system types relate to {@link TableSchema}.
 * This namespace should be strictly type-exported by the package.
 * All members should be tagged with `@system`.
 *
 * Orphaned Cells:
 * Without safeguards, it is possible for cells to become "orphaned".
 * An orphaned cell is a cell that does not correspond to a valid row and column.
 * In order to preserve the invariant that all cells must have a valid row and column, table operations
 * (eg, inserting/removing rows/columns, or setting/removing a cell) will automatically include constraints that
 * guard transactions from producing orphaned cells.
 *
 * @system @beta
 */
export declare namespace System_TableSchema {
    /**
     * A list of items in a table whose elements may be rearranged, but not inserted or removed.
     *
     * @privateRemarks Used by {@link TableSchema.Table} for its `rows` and `columns` properties to allow basic rearrangement operations on the underlying sequences without permitting mutation operations that might violate table invariants.
     *
     * Note: this can't reasonably be implemented via `Pick<ArrayNode<...>>` because we only want to include the
     * subset of its method overloads which do not support moving items between lists.
     *
     * @beta @system
     */
    type RearrangeableList<TItemSchema extends ImplicitAllowedTypes> = TreeNode & readonly TreeNodeFromImplicitAllowedTypes<TItemSchema>[] & {
        /** {@inheritDoc (TreeArrayNode:interface).(moveToEnd:1)} */
        moveToEnd(sourceIndex: number): void;
        /** {@inheritDoc (TreeArrayNode:interface).(moveToStart:1)} */
        moveToStart(sourceIndex: number): void;
        /** {@inheritDoc (TreeArrayNode:interface).(moveToIndex:1)} */
        moveToIndex(sourceIndex: number, destinationIndex: number): void;
        /** {@inheritDoc (TreeArrayNode:interface).(moveRangeToEnd:1)} */
        moveRangeToEnd(startIndex: number, endIndex: number): void;
        /** {@inheritDoc (TreeArrayNode:interface).(moveRangeToStart:1)} */
        moveRangeToStart(startIndex: number, endIndex: number): void;
        /** {@inheritDoc (TreeArrayNode:interface).(moveRangeToIndex:1)} */
        moveRangeToIndex(startIndex: number, endIndex: number, destinationIndex: number): void;
    };
    /**
     * Default type used for column and row "props" fields.
     * @privateRemarks
     * Longer term, it would be better to simply omit "props" altogether by default.
     * For now, this ensures that the user doesn't have to specify a "props" entry when initializing column/row nodes
     * and ensures that they cannot set anything that might conflict with future evolutions of the schema.
     * @system @beta
     */
    type DefaultPropsType = ReturnType<typeof SchemaFactory.optional<[]>>;
    /**
     * A base interface for factory input options which include an schema factory.
     * @remarks This interface should not be referenced directly.
     * @privateRemarks This interface primarily exists to provide a single home for property documentation.
     * @system @beta
     */
    interface OptionsWithSchemaFactory<TSchemaFactory extends SchemaFactoryBeta> {
        /**
         * Schema factory with which the Column schema will be associated.
         * @remarks Can be used to associate the resulting schema with an existing {@link SchemaFactory.scope|scope}.
         * The resulting schema will have an identifier of the form: `com.fluidframework.table<${TUserScope}>.<Column|Row|Table>`.
         */
        readonly schemaFactory: TSchemaFactory;
    }
    /**
     * A base interface for factory input options which include the table cell schema.
     * @remarks This interface should not be referenced directly.
     * @privateRemarks This interface primarily exists to provide a single home for property documentation.
     * @system @beta
     */
    interface OptionsWithCellSchema<TCellSchema extends ImplicitAllowedTypes> {
        /**
         * Schema for the table's cells.
         */
        readonly cell: TCellSchema;
    }
    /**
     * Base options for creating table column schema.
     * @remarks Includes parameters common to all column factory overloads.
     * @system @beta
     */
    type CreateColumnOptionsBase<TUserScope extends string = string, TSchemaFactory extends SchemaFactoryBeta<TUserScope> = SchemaFactoryBeta<TUserScope>, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCellSchema>;
    /**
     * Factory for creating column schema.
     * @system @beta
     */
    function createColumnSchema<const TUserScope extends string, const TCellSchema extends ImplicitAllowedTypes, const TPropsSchema extends ImplicitFieldSchema>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, propsSchema: TPropsSchema): TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Column">, NodeKind.Object, TreeNode & TableSchema.Column<TCellSchema, TPropsSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Column">, NodeKind, unknown>, object & {
        readonly id?: string | undefined;
    } & (FieldHasDefault<TPropsSchema> extends true ? {
        /**
         * The column's properties.
         * @remarks This is a user-defined schema that can be used to store additional information about the column.
         */
        props?: InsertableTreeFieldFromImplicitField<TPropsSchema> | undefined;
    } : {
        /**
         * The column's properties.
         * @remarks This is a user-defined schema that can be used to store additional information about the column.
         */
        props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
    }), true, {
        readonly props: TPropsSchema;
        readonly id: import("./simple-tree/fieldSchema.js").FieldSchema<FieldKind.Identifier, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, unknown>;
    }>;
    /**
     * Base column schema type.
     * @sealed @system @beta
     */
    type ColumnSchemaBase<TUserScope extends string = string, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes, TPropsSchema extends ImplicitFieldSchema = ImplicitFieldSchema> = ReturnType<typeof createColumnSchema<TUserScope, TCellSchema, TPropsSchema>>;
    /**
     * Base options for creating table row schema.
     * @remarks Includes parameters common to all row factory overloads.
     * @system @beta
     */
    type CreateRowOptionsBase<TUserScope extends string = string, TSchemaFactory extends SchemaFactoryBeta<TUserScope> = SchemaFactoryBeta<TUserScope>, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCellSchema>;
    /**
     * Factory for creating row schema.
     * @system @beta
     */
    function createRowSchema<const TUserScope extends string, const TCellSchema extends ImplicitAllowedTypes, const TPropsSchema extends ImplicitFieldSchema>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, cellSchema: TCellSchema, propsSchema: TPropsSchema): TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row">, NodeKind.Object, TreeNode & TableSchema.Row<TCellSchema, TPropsSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row">, NodeKind, unknown>, object & {
        readonly id?: string | undefined;
        readonly cells: (import("./simple-tree/index.js").InsertableTypedNode<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, import("./simple-tree/index.js").RecordNodeInsertableData<TCellSchema>, true, TCellSchema, undefined, unknown>> | undefined) & import("./simple-tree/index.js").InsertableTypedNode<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, import("./simple-tree/index.js").RecordNodeInsertableData<TCellSchema>, true, TCellSchema, undefined, unknown>>;
    } & (FieldHasDefault<TPropsSchema> extends true ? {
        /**
         * The row's properties.
         * @remarks This is a user-defined schema that can be used to store additional information
         * about the row.
         */
        props?: InsertableTreeFieldFromImplicitField<TPropsSchema> | undefined;
    } : {
        /**
         * The row's properties.
         * @remarks This is a user-defined schema that can be used to store additional information
         * about the row.
         */
        props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
    }), true, {
        readonly props: TPropsSchema;
        readonly id: import("./simple-tree/fieldSchema.js").FieldSchema<FieldKind.Identifier, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, unknown>;
        /**
         * The cells of the table row, keyed by column ID.
         * @remarks
         * The table row models its cells as a record, where each key is the ID of the column it belongs to. The choice of record (as opposed to a map) is intended to make interop with common table rendering libraries in TypeScript/JavaScript easier.
         */
        readonly cells: import("./simple-tree/fieldSchema.js").FieldSchema<FieldKind.Required, TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, import("./simple-tree/index.js").RecordNodeInsertableData<TCellSchema>, true, TCellSchema, undefined, unknown>, unknown>;
    }>;
    /**
     * Base row schema type.
     * @sealed @system @beta
     */
    type RowSchemaBase<TUserScope extends string = string, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes, TPropsSchema extends ImplicitFieldSchema = ImplicitFieldSchema> = ReturnType<typeof createRowSchema<TUserScope, TCellSchema, TPropsSchema>>;
    /**
     * Base options for creating table schema.
     * @remarks Includes parameters common to all table factory overloads.
     * @system @beta
     */
    type TableFactoryOptionsBase<TUserScope extends string = string, TSchemaFactory extends SchemaFactoryBeta<TUserScope> = SchemaFactoryBeta<TUserScope>, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCellSchema>;
    /**
     * Factory for creating table schema.
     * @system @beta
     */
    function createTableSchema<const TUserScope extends string, const TCellSchema extends ImplicitAllowedTypes, const TColumnSchema extends ColumnSchemaBase<TUserScope, TCellSchema>, const TRowSchema extends RowSchemaBase<TUserScope, TCellSchema>>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, _cellSchema: TCellSchema, columnSchema: TColumnSchema, rowSchema: TRowSchema): {
        /**
         * Create a table with initial contents.
         * @param initialContents - The initial contents of the table.
         * If not provided, an empty table will be constructed.
         * @remarks Performs the following input validation:
         * - Ensures that any cells specified in the initial rows correspond to existing columns in the initial columns.
         * - Ensures that all column and row IDs are unique.
         */
        create<TThis extends new (data?: InternalTreeNode | undefined) => TreeNode & TableSchema.Table<TUserScope, TCellSchema, TColumnSchema, TRowSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "TableRoot">, NodeKind, unknown>>(this: TThis, initialContents?: TableSchema.TableFactoryMethodParameters<TUserScope, TCellSchema, TColumnSchema, TRowSchema> | undefined): InstanceType<TThis>;
    } & (new (data?: InternalTreeNode | undefined) => TreeNode & TableSchema.Table<TUserScope, TCellSchema, TColumnSchema, TRowSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "TableRoot">, NodeKind, unknown>) & TreeNodeSchemaCore<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "TableRoot"> & string, NodeKind, false, unknown, never, unknown> & (new (data: InternalTreeNode) => TreeNode & TableSchema.Table<TUserScope, TCellSchema, TColumnSchema, TRowSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "TableRoot">, NodeKind, unknown> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "TableRoot"> & string, NodeKind, unknown>);
    /**
     * Base row schema type.
     * @sealed @system @beta
     */
    type TableSchemaBase<TUserScope extends string, TCellSchema extends ImplicitAllowedTypes, TColumnSchema extends ColumnSchemaBase<TUserScope, TCellSchema>, TRowSchema extends RowSchemaBase<TUserScope, TCellSchema>> = ReturnType<typeof createTableSchema<TUserScope, TCellSchema, TColumnSchema, TRowSchema>>;
}
/**
 * Contains types and factories for creating schema to represent dynamic tabular data.
 *
 * @remarks
 *
 * Note: the APIs produced by this module ensure various tabular data invariants are maintained that the raw, underlying tree structures do not.
 * For example, they ensure that cells always correspond to existing rows and columns (and do not become "orphaned" due to row/column deletion, etc.).
 * For this reason, direct manipulation of the underlying tree structures is not supported.
 * To modify the data, only the APIs provided here may be used.
 *
 * Also note: these APIs leverage `SharedTree` functionality that was added in version `2.80.0`,
 * which is not compatible with previous versions of this library.
 * To ensure safe collaboration, you will need to configure the {@link @fluidframework/runtime-definitions#MinimumVersionForCollab}
 * for the Fluid Runtime and/or `SharedTree` to at least `2.80.0`.
 * To set this minimum version for `SharedTree`, use {@link configuredSharedTreeBeta}.
 *
 * The primary APIs for create tabular data schema are:
 *
 * - {@link TableSchema.(table:1)}
 *
 * - {@link TableSchema.(column:1)}
 *
 * - {@link TableSchema.(row:1)}
 *
 * Tables created using these APIs are...
 *
 * - sparse, meaning that cells may be omitted, and new rows are empty by default.
 *
 * - dynamic, meaning that their structure can be modified at runtime.
 * Columns and rows can be inserted, removed, modified, and reordered.
 * Cells can be inserted, removed, and modified.
 *
 * - row-major, meaning that operating on rows (including inserts, removal, moves, and traversal) is more efficient than operating on columns.
 *
 * Column and Row schema created using these APIs are extensible via the `props` field.
 * This allows association of additional properties with column and row nodes.
 *
 * @example Defining a Table schema
 *
 * ```typescript
 * class MyTable extends TableSchema.table({
 * 	schemaFactory,
 * 	cell: schemaFactory.string,
 * }) {}
 *
 * const table = MyTable.create({
 * 	columns: [{ id: "column-0" }],
 * 	rows: [{ id: "row-0", cells: { "column-0": "Hello world!" } }],
 * });
 * ```
 *
 * @example Customizing Column and Row schema
 *
 * ```typescript
 * const Cell = schemaFactory.string;
 *
 * class MyColumn extends TableSchema.column({
 * 	schemaFactory,
 * 	cell: Cell,
 * 	props: schemaFactory.object("TableColumnProps", {
 * 		label: schemaFactory.string,
 * 	}),
 * }) {}
 *
 * class MyRow extends TableSchema.row({
 * 	schemaFactory,
 * 	cell: Cell,
 * }) {}
 *
 * class MyTable extends TableSchema.table({
 * 	schemaFactory,
 * 	cell: Cell,
 * 	column: MyColumn,
 * 	row: MyRow,
 * }) {}
 *
 * const table = new MyTable({
 * 	columns: [
 * 		new MyColumn({ props: { label: "Entry" } }),
 * 		new MyColumn({ props: { label: "Date" } }),
 * 		new MyColumn({ props: { label: "Amount" } }),
 * 	],
 * 	rows: [],
 * });
 * ```
 *
 * @example Listening for changes in the table
 *
 * ```typescript
 * // Listen for any changes to the table and its children.
 * // The "treeChanged" event will fire when the associated node or any of its descendants change.
 * Tree.on(table, "treeChanged", () => {
 * 	// Respond to the change.
 * });
 * ```
 *
 * @example Listening for changes to the rows list only
 *
 * ```typescript
 * // Listen for any changes to the list of rows.
 * // The "nodeChanged" event will fire only when the specified node itself changes (i.e., its own properties change).
 * // In this case, the event will fire when a row is added or removed, or the order of the list is changed.
 * // But it won't fire when a row's properties change, or when the row's cells change, etc.
 * Tree.on(table.rows, "nodeChanged", () => {
 * 	// Respond to the change.
 * });
 * ```
 *
 * @privateRemarks
 * The above examples are backed by tests in `tableSchema.spec.ts`.
 * Those tests and these examples should be kept in-sync to ensure that the examples are correct.
 *
 * @beta
 */
export declare namespace TableSchema {
    /**
     * A column in a table.
     * @remarks Implemented by the schema class returned from {@link TableSchema.(column:2)}.
     * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.
     * @typeParam TProps - Additional properties to associate with the column.
     * @sealed @beta
     */
    interface Column<TCell extends ImplicitAllowedTypes, TProps extends ImplicitFieldSchema = ImplicitFieldSchema> {
        /**
         * The unique identifier of the column.
         * @remarks Uniquely identifies the node within the entire tree, not just the table.
         */
        readonly id: string;
        /**
         * The column's properties.
         * @remarks This is a user-defined schema that can be used to store additional information about the column.
         * @privateRemarks
         * Note: these docs are duplicated on the inline type definitions in {@link System_TableSchema.createColumnSchema}.
         * If you update the docs here, please also update the inline type definitions.
         */
        get props(): TreeFieldFromImplicitField<TProps>;
        set props(value: InsertableTreeFieldFromImplicitField<TProps>);
    }
    /**
     * Factory for creating new table column schema.
     * @typeParam TUserScope - The {@link SchemaFactory.scope | schema factory scope}.
     * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.
     * @beta
     */
    function column<const TUserScope extends string, const TCell extends ImplicitAllowedTypes>(params: System_TableSchema.CreateColumnOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell>): System_TableSchema.ColumnSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>;
    /**
     * Factory for creating new table column schema.
     * @typeParam TUserScope - The {@link SchemaFactory.scope | schema factory scope}.
     * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.
     * @typeParam TProps - Additional properties to associate with the column.
     * @beta
     */
    function column<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateColumnOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
        /**
         * Optional column properties.
         */
        readonly props: TProps;
    }): System_TableSchema.ColumnSchemaBase<TUserScope, TCell, TProps>;
    /**
     * A row in a table.
     * @remarks Implemented by the schema class returned from {@link TableSchema.(row:2)}.
     * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.
     * @typeParam TProps - Additional properties to associate with the row.
     * @sealed @beta
     */
    interface Row<TCell extends ImplicitAllowedTypes, TProps extends ImplicitFieldSchema = ImplicitFieldSchema> {
        /**
         * The unique identifier of the row.
         * @remarks Uniquely identifies the node within the entire tree, not just the table.
         */
        readonly id: string;
        /**
         * The row's properties.
         * @remarks This is a user-defined schema that can be used to store additional information about the row.
         * @privateRemarks
         * Note: these docs are duplicated on the inline type definitions in {@link System_TableSchema.createRowSchema}.
         * If you update the docs here, please also update the inline type definitions.
         */
        get props(): TreeFieldFromImplicitField<TProps>;
        set props(value: InsertableTreeFieldFromImplicitField<TProps>);
    }
    /**
     * Factory for creating new table column schema.
     * @typeParam TUserScope - The {@link SchemaFactory.scope | schema factory scope}.
     * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.
     * @beta
     */
    function row<const TUserScope extends string, const TCell extends ImplicitAllowedTypes>(params: System_TableSchema.CreateRowOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell>): System_TableSchema.RowSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>;
    /**
     * Factory for creating new table row schema.
     * @typeParam TUserScope - The {@link SchemaFactory.scope | schema factory scope}.
     * @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.
     * @typeParam TProps - Additional properties to associate with the row.
     * @beta
     */
    function row<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateRowOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
        /**
         * Optional row properties.
         */
        readonly props: TProps;
    }): System_TableSchema.RowSchemaBase<TUserScope, TCell, TProps>;
    /**
     * A key to uniquely identify a cell within a table.
     *
     * @remarks
     * Note that edits to the table structure (including edits by collaborators) can cause indexes to refer to different cells over time.
     * Therefore, it is recommended to use IDs or node references whenever possible to identify cells.
     *
     * @input @beta
     */
    interface CellKey<TColumn extends ImplicitAllowedTypes, TRow extends ImplicitAllowedTypes> {
        /**
         * {@link TableSchema.Column}, {@link TableSchema.Column.id}, or column index at which the cell is located.
         */
        readonly column: string | number | TreeNodeFromImplicitAllowedTypes<TColumn>;
        /**
         * {@link TableSchema.Row}, {@link TableSchema.Row.id}, or row index at which the cell is located.
         */
        readonly row: string | number | TreeNodeFromImplicitAllowedTypes<TRow>;
    }
    /**
     * {@link TableSchema.Table.insertColumns} parameters.
     * @input @beta
     */
    interface InsertColumnsParameters<TColumn extends ImplicitAllowedTypes> {
        /**
         * The index at which to insert the new columns.
         * @remarks If not provided, the columns will be appended to the end of the table.
         */
        readonly index?: number | undefined;
        /**
         * The columns to insert.
         */
        readonly columns: InsertableTreeNodeFromImplicitAllowedTypes<TColumn>[];
    }
    /**
     * {@link TableSchema.Table.insertRows} parameters.
     * @input @beta
     */
    interface InsertRowsParameters<TRow extends ImplicitAllowedTypes> {
        /**
         * The index at which to insert the new rows.
         * @remarks If not provided, the rows will be appended to the end of the table.
         */
        readonly index?: number | undefined;
        /**
         * The rows to insert.
         */
        readonly rows: InsertableTreeNodeFromImplicitAllowedTypes<TRow>[];
    }
    /**
     * {@link TableSchema.Table.setCell} parameters.
     * @input @beta
     */
    interface SetCellParameters<TCell extends ImplicitAllowedTypes, TColumn extends ImplicitAllowedTypes, TRow extends ImplicitAllowedTypes> {
        /**
         * The key to uniquely identify a cell in a table.
         */
        readonly key: CellKey<TColumn, TRow>;
        /**
         * The cell to set.
         */
        readonly cell: InsertableTreeNodeFromImplicitAllowedTypes<TCell>;
    }
    /**
     * A table.
     *
     * @remarks Table schema is created via the {@link TableSchema.(table:1)} factory.
     * Node instances of the schema type should be constructed via the static `create` method on the schema class.
     * E.g. `const table = MyTableSchema.create({ columns, rows});`
     *
     * @typeParam TUserScope - The {@link SchemaFactory.scope | schema factory scope}.
     * @typeParam TCell - The type of the cells in the table.
     * @typeParam TColumn - The type of the columns in the table.
     * @typeParam TRow - The type of the rows in the table.
     *
     * @sealed @beta
     */
    interface Table<TUserScope extends string, TCell extends ImplicitAllowedTypes, TColumn extends System_TableSchema.ColumnSchemaBase<TUserScope, TCell>, TRow extends System_TableSchema.RowSchemaBase<TUserScope, TCell>> {
        /**
         * The table's columns.
         */
        readonly columns: System_TableSchema.RearrangeableList<TColumn>;
        /**
         * The table's rows.
         */
        readonly rows: System_TableSchema.RearrangeableList<TRow>;
        /**
         * Gets a table column by its {@link TableSchema.Column.id}.
         * @returns The column, if it exists. Otherwise, `undefined`.
         */
        getColumn(id: string): TreeNodeFromImplicitAllowedTypes<TColumn> | undefined;
        /**
         * Gets a table column by its index in the table.
         *
         * @remarks
         * Note that edits to the table structure (including edits by collaborators) can cause indexes to refer to different columns over time.
         * Therefore, it is recommended to use IDs whenever possible to identify columns.
         *
         * @returns The column, if it exists. Otherwise, `undefined`.
         */
        getColumn(index: number): TreeNodeFromImplicitAllowedTypes<TColumn> | undefined;
        /**
         * Gets a table row by its {@link TableSchema.Row.id}.
         * @returns The row, if it exists. Otherwise, `undefined`.
         */
        getRow(id: string): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
        /**
         * Gets a table row by its index in the table.
         *
         * @remarks
         * Note that edits to the table structure (including edits by collaborators) can cause indexes to refer to different rows over time.
         * Therefore, it is recommended to use IDs whenever possible to identify rows.
         *
         * @returns The row, if it exists. Otherwise, `undefined`.
         */
        getRow(index: number): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
        /**
         * Gets a cell in the table by corresponding column and row.
         * @param key - A key that uniquely distinguishes a cell in the table, represented as a combination of the column ID and row ID.
         * @returns The cell, if it exists. Otherwise, `undefined`.
         */
        getCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
        /**
         * Inserts 0 or more columns into the table.
         *
         * @throws Throws an error if the specified index is out of range.
         *
         * No columns are inserted in this case.
         */
        insertColumns(params: InsertColumnsParameters<TColumn>): TreeNodeFromImplicitAllowedTypes<TColumn>[];
        /**
         * Inserts 0 or more rows into the table.
         *
         * @throws
         * Throws an error in the following cases:
         *
         * - The row contains cells, but the table does not contain matching columns for one or more of those cells.
         *
         * - The specified index is out of range.
         *
         * No rows are inserted in these cases.
         */
        insertRows(params: InsertRowsParameters<TRow>): TreeNodeFromImplicitAllowedTypes<TRow>[];
        /**
         * Sets the cell at the specified location in the table.
         * @remarks To remove a cell, call {@link TableSchema.Table.removeCell} instead.
         */
        setCell(params: SetCellParameters<TCell, TColumn, TRow>): void;
        /**
         * Removes a range of columns from the table.
         *
         * @remarks
         * Also removes any corresponding cells from the table's rows.
         *
         * Note: this operation can be slow for tables with many rows.
         * We are actively working on improving the performance of this operation, but for now it may have a negative
         * impact on performance.
         * @param index - The starting index of the range to remove. Default: `0`.
         * @param count - The number of columns to remove. Default: all remaining columns starting from `index`.
         * @throws Throws an error if the specified range is invalid. In this case, no columns are removed.
         */
        removeColumns(index?: number | undefined, count?: number | undefined): TreeNodeFromImplicitAllowedTypes<TColumn>[];
        /**
         * Removes 0 or more columns from the table.
         * @remarks
         * Also removes any corresponding cells from the table's rows.
         *
         * Note: this operation can be slow for tables with many rows.
         * We are actively working on improving the performance of this operation, but for now it may have a negative
         * impact on performance.
         *
         * @param columns - The columns to remove.
         * @throws Throws an error if any of the columns are not in the table.
         * In this case, no columns are removed.
         */
        removeColumns(columns: readonly TreeNodeFromImplicitAllowedTypes<TColumn>[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];
        /**
         * Removes 0 or more columns from the table.
         *
         * @remarks
         * Also removes any corresponding cells from the table's rows.
         *
         * Note: this operation can be slow for tables with many rows.
         * We are actively working on improving the performance of this operation, but for now it may have a negative
         * impact on performance.
         *
         * @param columns - The columns to remove, specified by their {@link TableSchema.Column.id}.
         * @throws Throws an error if any of the columns are not in the table.
         * In this case, no columns are removed.
         */
        removeColumns(columns: readonly string[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];
        /**
         * Removes a range of rows from the table.
         * @param index - The starting index of the range to remove. Default: `0`.
         * @param count - The number of rows to remove. Default: all remaining rows starting from `index`.
         * @throws Throws an error if the specified range is invalid. In this case, no rows are removed.
         */
        removeRows(index?: number | undefined, count?: number | undefined): TreeNodeFromImplicitAllowedTypes<TRow>[];
        /**
         * Removes 0 or more rows from the table.
         * @param rows - The rows to remove.
         * @throws Throws an error if any of the rows are not in the table.
         * In this case, no rows are removed.
         */
        removeRows(rows: readonly TreeNodeFromImplicitAllowedTypes<TRow>[]): TreeNodeFromImplicitAllowedTypes<TRow>[];
        /**
         * Removes 0 or more rows from the table.
         * @param rows - The rows to remove, specified by their {@link TableSchema.Row.id}.
         * @throws Throws an error if any of the rows are not in the table.
         * In this case, no rows are removed.
         */
        removeRows(rows: readonly string[]): TreeNodeFromImplicitAllowedTypes<TRow>[];
        /**
         * Removes the cell at the specified location in the table.
         * @returns The cell if it exists, otherwise undefined.
         * @throws Throws an error if the location does not exist in the table.
         */
        removeCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
    }
    /**
     * Input parameters for {@link TableSchema.Table}'s `create` factory method.
     * @input @beta
     */
    interface TableFactoryMethodParameters<TUserScope extends string, TCell extends ImplicitAllowedTypes, TColumn extends System_TableSchema.ColumnSchemaBase<TUserScope, TCell>, TRow extends System_TableSchema.RowSchemaBase<TUserScope, TCell>> {
        /**
         * Initial columns for the table.
         */
        readonly columns?: Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TColumn>> | undefined;
        /**
         * Initial rows for the table.
         * @remarks If any cells are specified, they will be validated against the IDs of the provided columns.
         */
        readonly rows?: Iterable<InsertableTreeNodeFromImplicitAllowedTypes<TRow>> | undefined;
    }
    /**
     * Factory for creating new table schema.
     * @typeParam TUserScope - The {@link SchemaFactory.scope | schema factory scope}.
     * The resulting schema will have an identifier of the form: `com.fluidframework.table<${TUserScope}>.Table`.
     * @typeParam TCell - The type of the cells in the table.
     * @beta
     */
    function table<const TUserScope extends string, const TCell extends ImplicitAllowedTypes>(params: System_TableSchema.TableFactoryOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell>): System_TableSchema.TableSchemaBase<TUserScope, TCell, System_TableSchema.ColumnSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>, System_TableSchema.RowSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>>;
    /**
     * Factory for creating new table schema with custom column schema.
     * @typeParam TUserScope - The {@link SchemaFactory.scope | schema factory scope}.
     * The resulting schema will have an identifier of the form: `com.fluidframework.table<${TUserScope}>.Table`.
     * @typeParam TCell - The type of the cells in the table.
     * @typeParam TColumn - The type of the columns in the table.
     * @beta
     */
    function table<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TColumn extends System_TableSchema.ColumnSchemaBase<TUserScope, TCell>>(params: System_TableSchema.TableFactoryOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
        readonly column: TColumn;
    }): System_TableSchema.TableSchemaBase<TUserScope, TCell, TColumn, System_TableSchema.RowSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>>;
    /**
     * Factory for creating new table schema with custom row schema.
     * @typeParam TUserScope - The {@link SchemaFactory.scope | schema factory scope}.
     * The resulting schema will have an identifier of the form: `com.fluidframework.table<${TUserScope}>.Table`.
     * @typeParam TCell - The type of the cells in the table.
     * @typeParam TRow - The type of the rows in the table.
     * @beta
     */
    function table<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TRow extends System_TableSchema.RowSchemaBase<TUserScope, TCell>>(params: System_TableSchema.TableFactoryOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
        readonly row: TRow;
    }): System_TableSchema.TableSchemaBase<TUserScope, TCell, System_TableSchema.ColumnSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>, TRow>;
    /**
     * Factory for creating new table schema with custom column and row schema.
     * @typeParam TUserScope - The {@link SchemaFactory.scope | schema factory scope}.
     * The resulting schema will have an identifier of the form: `com.fluidframework.table<${TUserScope}>.Table`.
     * @typeParam TCell - The type of the cells in the table.
     * @typeParam TColumn - The type of the columns in the table.
     * @typeParam TRow - The type of the rows in the table.
     * @beta
     */
    function table<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TColumn extends System_TableSchema.ColumnSchemaBase<TUserScope, TCell>, const TRow extends System_TableSchema.RowSchemaBase<TUserScope, TCell>>(params: System_TableSchema.TableFactoryOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
        readonly column: TColumn;
        readonly row: TRow;
    }): System_TableSchema.TableSchemaBase<TUserScope, TCell, TColumn, TRow>;
}
//# sourceMappingURL=tableSchema.d.ts.map