import type AttributeTableElement from "./AttributeTableElement.js";
import type { ClonableMixin } from "../../core/Clonable.js";
import type { AttributeTableElementProperties } from "./AttributeTableElement.js";
import type { NestedAttributeTableElement } from "../support/tablesUtils.js";
import type { AttributeTableRelationshipElementProperties } from "./AttributeTableRelationshipElement.js";
import type { AttributeTableFieldElementProperties } from "./AttributeTableFieldElement.js";
import type { AttributeTableAttachmentElementProperties } from "./AttributeTableAttachmentElement.js";

export interface AttributeTableGroupElementProperties extends AttributeTableElementProperties {
  /**
   * An array of [field](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableFieldElement/), [relationship](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableRelationshipElement/), and [attachment](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableAttachmentElement/) elements to display as grouped.
   *
   * > [!WARNING]
   * >
   * > Nested group table elements are not supported.
   */
  elements?: ((AttributeTableAttachmentElementProperties & { type: "attachment" }) | (AttributeTableFieldElementProperties & { type: "field" }) | (AttributeTableRelationshipElementProperties & { type: "relationship" }))[];
}

/**
 * An `AttributeTableGroupElement` table element defines a container that holds a set of
 * [table elements](https://developers.arcgis.com/javascript/latest/references/core/tables/AttributeTableTemplate/#elements).
 *
 * > [!WARNING]
 * >
 * > Nested group table elements are not supported.
 * > This element type is only supported in standalone SDK applications. Grouping columns and saving them are not yet supported in the ArcGIS Online Map Viewer.
 *
 * @since 4.31
 * @see [FeatureTable](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/)
 * @see [AttributeTableTemplate](https://developers.arcgis.com/javascript/latest/references/core/tables/AttributeTableTemplate/)
 */
export default class AttributeTableGroupElement extends AttributeTableGroupElementSuperclass {
  constructor(properties?: AttributeTableGroupElementProperties);
  /**
   * An array of [field](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableFieldElement/), [relationship](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableRelationshipElement/), and [attachment](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableAttachmentElement/) elements to display as grouped.
   *
   * > [!WARNING]
   * >
   * > Nested group table elements are not supported.
   */
  get elements(): NestedAttributeTableElement[];
  set elements(value: ((AttributeTableAttachmentElementProperties & { type: "attachment" }) | (AttributeTableFieldElementProperties & { type: "field" }) | (AttributeTableRelationshipElementProperties & { type: "relationship" }))[]);
  /** The type of the attribute table [element](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableElement/). */
  get type(): "group";
  /**
   * Creates a deep clone of the AttributeTableGroupElement class.
   *
   * @returns A deep clone of the AttributeTableGroupElement instance.
   */
  clone(): this;
}
declare const AttributeTableGroupElementSuperclass: typeof AttributeTableElement & typeof ClonableMixin