import type SearchLayerField from "./SearchLayerField.js";
import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
import type { SearchLayerFieldProperties } from "./SearchLayerField.js";

export interface SearchLayerProperties extends JSONSupportMixinProperties, Partial<Pick<SearchLayer, "id" | "subLayer">> {
  /** The field to use for search. */
  field?: SearchLayerFieldProperties;
}

/**
 * Represents a layer to be included in search.
 *
 * @since 4.7
 */
export default class SearchLayer extends JSONSupport {
  constructor(properties?: SearchLayerProperties);
  /** The field to use for search. */
  get field(): SearchLayerField;
  set field(value: SearchLayerFieldProperties);
  /** The id of the layer. */
  accessor id: string;
  /** The sub layer index. */
  accessor subLayer: number | null | undefined;
  /**
   * Creates a deep clone of this object.
   *
   * @returns Creates a deep clone of the instance calling this method.
   */
  clone(): SearchLayer;
}