import type SearchTableField from "./SearchTableField.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { SearchTableFieldProperties } from "./SearchTableField.js";

export interface SearchTableProperties extends Partial<Pick<SearchTable, "id">> {
  /** The field to use for search. */
  field?: SearchTableFieldProperties | null;
}

/**
 * Represents a table to be included in search.
 *
 * @since 4.18
 */
export default class SearchTable extends JSONSupport {
  constructor(properties?: SearchTableProperties);
  /** The field to use for search. */
  get field(): SearchTableField | null | undefined;
  set field(value: SearchTableFieldProperties | null | undefined);
  /** The id of the table. */
  accessor id: string | null | undefined;
  /**
   * Creates a deep clone of this object.
   *
   * @returns Creates a deep clone of the instance calling this method.
   */
  clone(): SearchTable;
}